File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,8 +16,10 @@ public void RunInitialSync()
1616 throw new DirectoryNotFoundException ( $ "Source folder '{ Config . SourceFolder } ' no longer exists") ;
1717 if ( ! Directory . Exists ( Config . BackupFolder ) )
1818 throw new DirectoryNotFoundException ( $ "Backup folder '{ Config . BackupFolder } ' no longer exists") ;
19- if ( ! Directory . Exists ( Config . LogFilePath ) )
19+ if ( ! Directory . Exists ( Directory . GetParent ( Config . LogFilePath ) . ToString ( ) ) )
2020 throw new DirectoryNotFoundException ( $ "Log file path '{ Config . LogFilePath } ' no longer exists") ;
21+ if ( ! File . Exists ( Config . LogFilePath ) )
22+ throw new FileNotFoundException ( $ "Log file '{ Config . LogFilePath } ' no longer exists") ;
2123
2224 CheckForMissingDirs ( ) ;
2325 CheckForDeletedFiles ( ) ;
@@ -34,8 +36,10 @@ public void RunSyncLoop()
3436 throw new DirectoryNotFoundException ( $ "Source folder '{ Config . SourceFolder } ' no longer exists") ;
3537 if ( ! Directory . Exists ( Config . BackupFolder ) )
3638 throw new DirectoryNotFoundException ( $ "Backup folder '{ Config . BackupFolder } ' no longer exists") ;
37- if ( ! Directory . Exists ( Config . LogFilePath ) )
39+ if ( ! Directory . Exists ( Directory . GetParent ( Config . LogFilePath ) . ToString ( ) ) )
3840 throw new DirectoryNotFoundException ( $ "Log file path '{ Config . LogFilePath } ' no longer exists") ;
41+ if ( ! File . Exists ( Config . LogFilePath ) )
42+ throw new FileNotFoundException ( $ "Log file '{ Config . LogFilePath } ' no longer exists") ;
3943 CheckForMissingDirs ( ) ;
4044 CheckForModifiedFiles ( ) ;
4145 CheckForCopiesInSource ( ) ;
You can’t perform that action at this time.
0 commit comments