Skip to content

Commit 1551fb2

Browse files
committed
Fixed the warning
1 parent 2adb705 commit 1551fb2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

SFTPSyncLib/RemoteSync.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class RemoteSync : IDisposable
1212
string _searchPattern;
1313
string _localRootDirectory;
1414
string _remoteRootDirectory;
15-
readonly List<string> _excludedFolders;
15+
readonly List<string>? _excludedFolders;
1616

1717
SftpClient _sftp;
1818
SyncDirector _director;
@@ -23,7 +23,7 @@ public class RemoteSync : IDisposable
2323

2424
public RemoteSync(string host, string username, string password,
2525
string localRootDirectory, string remoteRootDirectory,
26-
string searchPattern, bool createFolders, SyncDirector director, List<string> excludedFolders)
26+
string searchPattern, bool createFolders, SyncDirector director, List<string>? excludedFolders)
2727
{
2828
_host = host;
2929
_username = username;
@@ -32,7 +32,7 @@ public RemoteSync(string host, string username, string password,
3232
_localRootDirectory = localRootDirectory;
3333
_remoteRootDirectory = remoteRootDirectory;
3434
_director = director;
35-
_excludedFolders = excludedFolders;
35+
_excludedFolders = excludedFolders ?? new List<string>();
3636
_sftp = new SftpClient(host, username, password);
3737
_sftp.Connect();
3838

0 commit comments

Comments
 (0)