mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
Restoring consistent behavior of failing, between duplicating and moving/renaming files over existing file with WebDAV protocol in scripting and .NET assembly
The discrepancy was introduced by Bug 2120 cb021fe3.
This restores the mv/MoveFile behavior to fail, if the target file exists with WebDAV protocol (but still allows overwrite in the GUI).
The cp/DuplicateFile behavior is unchanged, but the internal API was modified to match that of mv/MoveFile, in anticipation of aligning move/duplicate command behavior in GUI and need to keep current scripting/.NET behavior.
Source commit: 4661a3ea7ec8123231e376aae9913ce8457750dd
This commit is contained in:
@@ -1172,14 +1172,14 @@ void __fastcall TSCPFileSystem::DeleteFile(const UnicodeString FileName,
|
||||
ExecCommand(fsDeleteFile, ARRAYOFCONST((DelimitStr(FileName))));
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TSCPFileSystem::RenameFile(const UnicodeString FileName, const TRemoteFile * /*File*/,
|
||||
const UnicodeString NewName)
|
||||
void __fastcall TSCPFileSystem::RenameFile(
|
||||
const UnicodeString & FileName, const TRemoteFile *, const UnicodeString & NewName, bool DebugUsedArg(Overwrite))
|
||||
{
|
||||
ExecCommand(fsRenameFile, ARRAYOFCONST((DelimitStr(FileName), DelimitStr(NewName))));
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TSCPFileSystem::CopyFile(const UnicodeString FileName, const TRemoteFile * /*File*/,
|
||||
const UnicodeString NewName)
|
||||
void __fastcall TSCPFileSystem::CopyFile(
|
||||
const UnicodeString & FileName, const TRemoteFile *, const UnicodeString & NewName, bool DebugUsedArg(Overwrite))
|
||||
{
|
||||
UnicodeString DelimitedFileName = DelimitStr(FileName);
|
||||
UnicodeString DelimitedNewName = DelimitStr(NewName);
|
||||
|
||||
Reference in New Issue
Block a user