Skip to content

Commit

Permalink
Check full path instead of relative path in ListFileRecursive
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottRFrost committed Mar 29, 2019
1 parent e781f86 commit 679bb83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/SimpleSFTPSyncCore/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ public static void Main(string[] args)
{
var db = new SimpleSFTPSyncCoreContext();
var command = string.Join(" ", args).Substring(4);
#pragma warning disable EF1000 // Possible SQL injection vulnerability.
Log(db.Database.ExecuteSqlCommand(command) + " rows affected");
#pragma warning restore EF1000 // Possible SQL injection vulnerability.
}

// Test parse TV
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleSFTPSyncCore/SimpleSFTPSync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ private int ListFilesRecursive(SftpClient sftp, string basePath, string subDirec
}
else
{
var file = db.SyncFile.FirstOrDefault(f => f.RemotePath == filePath);
var file = db.SyncFile.FirstOrDefault(f => f.RemotePath == basePath + filePath);
if (file == null)
{
Log("Found New file: " + basePath + filePath);
Expand Down

0 comments on commit 679bb83

Please sign in to comment.