I'm not sure if this is an enhancement request or a bug report <grin>.
Which version of Windows you are using:
Windows 7 Pro SP1
Which version of Explorer++ you are using, and the build type (32-bit or 64-bit):
1.3.5 32-bit
Whether the bug arose in previous versions of Explorer++:
unknown - I'm new to using & compiling Explorer++
What you were doing at the time of the crash/what caused the bug:
Trying to rename a file with the exact same new name as the old name.
This brings up two sequential error dialogs before the expected result
(the file retains its name). The error dialogs aren't very descriptive.
The behavior I would like is that the two error dialogs are suppressed
and the file retain its name. This is easy to accomplish; in file:
explorer++_1.3.5_src\Explorer++\Helper\FileOperations.cpp
at or near line number 29, add one new line:
[code]BOOL NFileOperations::RenameFile(const std::wstring &strOldFilename,
const std::wstring &strNewFilename)
{
if (strOldFilename == strNewFilename) return true;//efm5 Bypass the error dialogs
TCHAR *pszOldFilename = new TCHAR[strOldFilename.size() + 2];[/code]
Renaming with identical name throws two error dialogs
-
- Site Admin
- Posts: 936
- Joined: Sat Apr 18, 2009 1:46 am
Re: Renaming with identical name throws two error dialogs
It definitely sounds like this would be worthwhile. Could you file a pull request?
Re: Renaming with identical name throws two error dialogs
Sorry David, I have no idea how to do "pull requests". As it is just a matter of adding a single line of code in file:
explorer++_1.3.5_src\Explorer++\Helper\FileOperations.cpp
at or near line number 29:
if (strOldFilename == strNewFilename) return true;
I'm hoping that a pull request is overkill <grin>.
explorer++_1.3.5_src\Explorer++\Helper\FileOperations.cpp
at or near line number 29:
if (strOldFilename == strNewFilename) return true;
I'm hoping that a pull request is overkill <grin>.