Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion SFTPSyncLib/RemoteSync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ private static async Task CreateDirectoriesInternal(
return item.Name.Remove(item.Name.IndexOf(".DIR", StringComparison.OrdinalIgnoreCase));
else
return item.Name;
});
}, StringComparer.OrdinalIgnoreCase);

foreach (var item in localDirectories)
{
Expand Down Expand Up @@ -741,6 +741,14 @@ private async void Fsw_DirectoryRenamed(object? sender, RenamedEventArgs arg)
var oldRemotePath = GetRemotePathForLocal(arg.OldFullPath);
var newRemotePath = GetRemotePathForLocal(arg.FullPath);

// OpenVMS directory names preserve case but are case-insensitive. A case-only
// local rename therefore refers to the same remote directory and needs no action.
if (string.Equals(oldRemotePath, newRemotePath, StringComparison.OrdinalIgnoreCase))
{
Logger.LogInfo($"Ignoring case-only directory rename: {oldRemotePath} -> {newRemotePath}");
return;
}

await _sftpLock.WaitAsync();
try
{
Expand Down
Loading