File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ public class BackupTask
1212 private readonly BackupConfig BackupConfig ;
1313 private readonly RemoteServerConfig RemoteServerConfig ;
1414 private readonly DiscordWebhookLogService LogService ;
15- private readonly FileHelper FileHelper ;
1615
1716 public BackupTask ( BackupConfig backupConfig , RemoteServerConfig remoteServerConfig ,
1817 DiscordWebhookLogService logService )
@@ -30,7 +29,7 @@ public async Task Run()
3029
3130 var timestamp = DateTime . Now . ToString ( "yyyyMMdd_HHmmss" ) ;
3231 var zipFileName = $ "{ BackupConfig . BackupPrefix } { timestamp } .zip";
33- await FileHelper . CopyDirectory ( BackupConfig . BackupPath , Path . GetTempPath ( ) + zipFileName , false ) ;
32+ FileHelper . CopyDirectory ( BackupConfig . BackupPath , Path . GetTempPath ( ) + zipFileName , false ) ;
3433
3534
3635 var tempZipPath = Path . Combine ( Path . GetTempPath ( ) , zipFileName ) ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ namespace ByteMeBackup.Helper;
44
55public class FileHelper
66{
7- public async Task CopyDirectory ( string sourceDir , string destinationDir , bool recursive )
7+ public static void CopyDirectory ( string sourceDir , string destinationDir , bool recursive )
88 {
99 // Get information about the source directory
1010 var dir = new DirectoryInfo ( sourceDir ) ;
You can’t perform that action at this time.
0 commit comments