@@ -134,7 +134,7 @@ public class CopyFileProgressInfo
134134 public static bool TryGetTempDirectory ( out string path )
135135 {
136136 path = default ;
137-
137+
138138 // Nested local function to reduce repetitive code.
139139 string GenerateTempPath ( )
140140 {
@@ -211,7 +211,7 @@ string GenerateTempPath()
211211 /// </param>
212212 /// <returns></returns>
213213 public static IEnumerable < string > GetDirectories (
214- IEnumerable < string > filepaths ,
214+ IEnumerable < string > filepaths ,
215215 bool creationOrder = true )
216216 {
217217 // For each filepath, determine the immediate parent directory of
@@ -223,9 +223,9 @@ public static IEnumerable<string> GetDirectories(
223223
224224 // skip if no parent
225225 if ( null == parent ) continue ;
226-
226+
227227 directoriesToCreate . Add ( parent ) ;
228-
228+
229229 }
230230
231231 // Return the list of directories to create in ascending order of
@@ -262,9 +262,9 @@ public static IEnumerable<string> GetDirectories(
262262 /// <param name="cancellationToken">Cancellation token.</param>
263263 /// <returns>Task</returns>
264264 public static async Task CopyFilesAsync (
265- IList < CopyFileOperation > operations ,
266- CancellationToken cancellationToken = default ,
267- IProgress < CopyFileProgressInfo > progress = null ,
265+ IList < CopyFileOperation > operations ,
266+ CancellationToken cancellationToken = default ,
267+ IProgress < CopyFileProgressInfo > progress = null ,
268268 int updateIntervalMS = DefaultUpdateIntervalMS )
269269 {
270270 IEnumerable < string > directoriesToCreate = GetDirectories (
@@ -302,9 +302,9 @@ public static async Task CopyFilesAsync(
302302 // Copy the files asynchronously with the provided
303303 // cancellation token, and progress stuff.
304304 await CopyFilesAsyncInternal (
305- operationsList ,
306- cancellationToken ,
307- progress ,
305+ operationsList ,
306+ cancellationToken ,
307+ progress ,
308308 progressInfo ) ;
309309 }
310310 else
@@ -322,9 +322,9 @@ await CopyFilesAsyncInternal(
322322 /// <param name="progressInfo">Progress information.</param>
323323 /// <returns>Task</returns>
324324 private static async Task CopyFilesAsyncInternal (
325- IEnumerable < CopyFileOperation > operations ,
326- CancellationToken cancellationToken = default ,
327- IProgress < CopyFileProgressInfo > progress = null ,
325+ IEnumerable < CopyFileOperation > operations ,
326+ CancellationToken cancellationToken = default ,
327+ IProgress < CopyFileProgressInfo > progress = null ,
328328 CopyFileProgressInfo progressInfo = default )
329329 {
330330 var tasks = operations . Select ( async copyOperation =>
@@ -361,14 +361,14 @@ private static async Task CopyFilesAsyncInternal(
361361 /// <param name="cancellationToken">Cancellation token.</param>
362362 /// <returns>Task</returns>
363363 private static async Task CopyFileAsync (
364- CopyFileOperation op ,
364+ CopyFileOperation op ,
365365 CancellationToken cancellationToken )
366366 {
367367 // Maximum number of times the operation is retried if it fails.
368368 const int maxRetries = 3 ;
369369
370370 // This is the initial delay before the operation is retried.
371- const int delayMilliseconds = 200 ;
371+ const int delayMilliseconds = 200 ;
372372
373373 for ( int attempt = 0 ; attempt < maxRetries ; attempt ++ )
374374 {
@@ -401,7 +401,7 @@ await Task.Run(() =>
401401 // exponentially increase the delay to maximize the chance
402402 // it will succeed without waiting too long.
403403 var delay = delayMilliseconds * ( int ) Math . Pow ( 2 , attempt ) ;
404-
404+
405405 // Construct detailed message regarding the nature of the problem.
406406 StringBuilder sb = new ( ) ;
407407 sb . AppendLine ( $ "Exception occurred during the following copy operation:") ;
@@ -685,7 +685,7 @@ private static void CreateDirectory(DirectoryInfo dInfo)
685685 {
686686 dInfo . Create ( ) ;
687687 }
688- catch ( Exception ex )
688+ catch ( Exception ex )
689689 {
690690 Debug . LogException ( ex ) ;
691691 }
@@ -790,7 +790,7 @@ public static void CleanDirectory(string directoryPath, bool ignoreGit = true)
790790 {
791791 // Skip .git directories
792792 if ( ignoreGit && subDir . EndsWith ( ".git" ) ) { continue ; }
793-
793+
794794 // TODO: This is a little bit dangerous as one developer has found out. If the output directory is not
795795 // empty, and contains directories and files unrelated to output, this will (without prompting)
796796 // delete them. So, if you're outputting to, say the "Desktop" directory, it will delete everything
@@ -846,4 +846,4 @@ public static void OpenDirectory(string path)
846846 }
847847#endif
848848 }
849- }
849+ }
0 commit comments