Merge pull request #102 from birarda/atp-mappings

append a trailing slash for folder rename
This commit is contained in:
Clément Brisset 2016-03-10 18:04:11 -08:00
commit 843bff1dcf

View file

@ -73,6 +73,11 @@ Window {
newPath = "/" + newPath;
}
if (oldPath[oldPath.length - 1] == '/' && newPath[newPath.length - 1] != '/') {
// this is a folder rename but the user neglected to add a trailing slash when providing a new path
newPath = newPath + "/";
}
if (Assets.isKnownFolder(newPath)) {
box = errorMessageBox("Cannot overwrite existing directory.");
box.selected.connect(reload);