mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
append a trailing slash for folder rename
This commit is contained in:
parent
625032f748
commit
39e869fdfd
1 changed files with 5 additions and 0 deletions
|
@ -73,6 +73,11 @@ Window {
|
||||||
newPath = "/" + newPath;
|
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)) {
|
if (Assets.isKnownFolder(newPath)) {
|
||||||
box = errorMessageBox("Cannot overwrite existing directory.");
|
box = errorMessageBox("Cannot overwrite existing directory.");
|
||||||
box.selected.connect(reload);
|
box.selected.connect(reload);
|
||||||
|
|
Loading…
Reference in a new issue