Menu

#146 Drive specifier only as Encrypted path fails to Encrypt/Decrypt.

1.2.1
New
nobody
None
Medium
Defect
2015-04-16
2015-04-16
mcm2boys
No

On my Win7 32bit system, when the encrypted folder is just a drive eg X: the call to RunExtTool() fails, because CPathUtils::Append() fails to add the File Separator to the Encrypted path between the drive specifier and the filename. This happens for both EncryptFile() and DecryptFile().

To fix this I changed the code from:

else if (IsFolderSeparator(path[pathLen - 1]) || path[pathLen - 1] == DeviceSeparator)
    newPath += append;

To:

else if (IsFolderSeparator(path[pathLen - 1]))
    newPath += append;
else if (path[pathLen - 1] == DeviceSeparator)
newPath += ThisOSPathSeparator + append;

However above the Append() function you say:
// Aims to conform to C++ <filesystem> semantics.
// e.g: "c:" + "append" = "c:append" not "c:\append"

This change obviously breaks that.

Thanks for a great little utility,
Laurie

Discussion


Log in to post a comment.