@@ -209,7 +209,8 @@ private static List<KeyValuePair<HostEntry, List<string>>> Initialize(string com
209209 password += key . KeyChar ;
210210 }
211211 }
212- byte [ ] bytes = ProtectedData . Protect ( Encoding . UTF8 . GetBytes ( userName + "|" + password ) , null , DataProtectionScope . CurrentUser ) ;
212+ byte [ ] bytes = ProtectedData . Protect ( Encoding . UTF8 . GetBytes ( userName + "|" + password ) , null ,
213+ DataProtectionScope . CurrentUser ) ;
213214 File . WriteAllBytes ( loginPath , bytes ) ;
214215 }
215216 if ( ! File . Exists ( loginPath ) )
@@ -218,7 +219,8 @@ private static List<KeyValuePair<HostEntry, List<string>>> Initialize(string com
218219 }
219220 {
220221 byte [ ] protectedBytes = File . ReadAllBytes ( loginPath ) ;
221- string unprotectedBytes = Encoding . UTF8 . GetString ( ProtectedData . Unprotect ( protectedBytes , null , DataProtectionScope . CurrentUser ) ) ;
222+ string unprotectedBytes = Encoding . UTF8 . GetString ( ProtectedData . Unprotect ( protectedBytes , null ,
223+ DataProtectionScope . CurrentUser ) ) ;
222224 int pos = unprotectedBytes . IndexOf ( '|' ) ;
223225 if ( pos < 0 )
224226 {
@@ -323,7 +325,7 @@ private static long BackupFile(string root, string remotePath, SftpClient client
323325
324326 try
325327 {
326- SftpFile file = client . Get ( remotePath ) ;
328+ var file = client . Get ( remotePath ) ;
327329 if ( file . IsRegularFile &&
328330 ( ! File . Exists ( fileName ) || file . LastWriteTimeUtc > File . GetLastWriteTimeUtc ( fileName ) ) )
329331 {
@@ -378,7 +380,7 @@ private static long BackupFolder(HostEntry host, string root, string path, SftpC
378380 {
379381 continue ;
380382 }
381- SftpFile file ;
383+ ISftpFile file ;
382384 try
383385 {
384386 file = client . Get ( fileOrFolder ) ;
@@ -400,7 +402,7 @@ private static long BackupFolder(HostEntry host, string root, string path, SftpC
400402 {
401403 try
402404 {
403- SftpFile [ ] files = client . ListDirectory ( fileOrFolder ) . Where ( f => f . IsRegularFile || ( f . IsDirectory && ! f . Name . StartsWith ( "." ) ) ) . ToArray ( ) ;
405+ var files = client . ListDirectory ( fileOrFolder ) . Where ( f => f . IsRegularFile || ( f . IsDirectory && ! f . Name . StartsWith ( "." ) ) ) . ToArray ( ) ;
404406 Parallel . ForEach ( files . Where ( f => f . IsRegularFile && ( host . IgnoreRegex == null || ! host . IgnoreRegex . IsMatch ( f . FullName ) ) ) , parallelOptions , ( _file ) =>
405407 {
406408 Interlocked . Add ( ref size , BackupFile ( root , _file . FullName , client ) ) ;
0 commit comments