From 797fdc340dde5340c9409aa36582a4d3cb52c5b2 Mon Sep 17 00:00:00 2001 From: Scott Sumner <30118311+sasumner@users.noreply.github.com> Date: Thu, 29 Aug 2019 15:29:28 -0400 Subject: [PATCH] Fix File-Rename failing when new name is on a different drive Fix #1978, close #6111 --- PowerEditor/src/ScitillaComponent/Buffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PowerEditor/src/ScitillaComponent/Buffer.cpp b/PowerEditor/src/ScitillaComponent/Buffer.cpp index eca50d55..980c0159 100644 --- a/PowerEditor/src/ScitillaComponent/Buffer.cpp +++ b/PowerEditor/src/ScitillaComponent/Buffer.cpp @@ -747,7 +747,7 @@ bool FileManager::moveFile(BufferID id, const TCHAR * newFileName) { Buffer* buf = getBufferByID(id); const TCHAR *fileNamePath = buf->getFullPathName(); - if (::MoveFileEx(fileNamePath, newFileName, MOVEFILE_REPLACE_EXISTING) == 0) + if (::MoveFileEx(fileNamePath, newFileName, MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED) == 0) return false; buf->setFileName(newFileName);