@@ -87,7 +87,20 @@ public static Patcher Instance
8787
8888 private PatchKit . Unity . Patcher . Cancellation . CancellationTokenSource _updateAppCancellationTokenSource ;
8989
90- public string TraceableAppSecret { get ; private set ; }
90+ public string TraceableAppSecret
91+ {
92+ get
93+ {
94+ if ( _traceableAppSecret == null )
95+ {
96+ _traceableAppSecret = BuildTraceableAppSecret ( ) ;
97+ }
98+
99+ return _traceableAppSecret ;
100+ }
101+ }
102+
103+ private string _traceableAppSecret ;
91104
92105 public string AppSecret { get ; private set ; }
93106
@@ -517,8 +530,8 @@ private void ThreadLoadPatcherData()
517530 _data . Value = inputArgumentsPatcherDataReader . Read ( ) ;
518531#endif
519532 AppSecret = _data . Value . AppSecret ;
520- BuildTraceableAppSecret ( AppSecret ) ;
521- DebugLogger . LogVariable ( AppSecret , "Data.AppSecret" ) ;
533+
534+ DebugLogger . LogVariable ( _data . Value . AppSecret , "Data.AppSecret" ) ;
522535 DebugLogger . LogVariable ( _data . Value . AppDataPath , "Data.AppDataPath" ) ;
523536 DebugLogger . LogVariable ( _data . Value . OverrideLatestVersionId , "Data.OverrideLatestVersionId" ) ;
524537 DebugLogger . LogVariable ( _data . Value . LockFilePath , "Data.LockFilePath" ) ;
@@ -960,10 +973,10 @@ private bool ThreadTryRestartWithRequestForPermissions()
960973 }
961974 }
962975
963- private void BuildTraceableAppSecret ( string appSecret )
976+ private string BuildTraceableAppSecret ( )
964977 {
965- TraceableAppSecret = string . Format ( "{0}...{1}" , appSecret . Substring ( 0 , 6 ) ,
966- appSecret . Substring ( appSecret . Length - 6 ) ) ;
978+ return string . Format ( "{0}...{1}" , AppSecret . Substring ( 0 , 6 ) ,
979+ AppSecret . Substring ( AppSecret . Length - 6 ) ) ;
967980 }
968981 }
969982}
0 commit comments