Add prepended slash on rename if missing

This commit is contained in:
Ryan Huffman 2016-03-10 15:38:20 -08:00
parent 76152906be
commit 76ed16314a

View file

@ -73,6 +73,10 @@ Window {
function doRenameFile(oldPath, newPath) {
console.log("Renaming " + oldPath + " to " + newPath);
if (newPath[0] != "/") {
newPath = "/" + newPath;
}
Assets.renameMapping(oldPath, newPath, function(err) {
if (err) {
console.log("Error renaming: ", oldPath, "=>", newPath, " - error ", err);