append a trailing slash for folder rename

This commit is contained in:
Stephen Birarda 2016-03-10 17:54:38 -08:00
parent 625032f748
commit 39e869fdfd

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);