Skip to content

Commit effb36b

Browse files
committed
Change FileHelper.cs to static void.
1 parent 3a6cb22 commit effb36b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ByteMeBackup/Core/BackupTask.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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);

ByteMeBackup/Helper/FileHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace ByteMeBackup.Helper;
44

55
public 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);

0 commit comments

Comments
 (0)