From 1671719c257e810da11752a638034409f0d404de Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Sat, 20 Oct 2018 18:47:46 -0700 Subject: [PATCH] Rename thumbs and scaled on image action=rename Signed-off-by: James Ketrenos --- server/routes/photos.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routes/photos.js b/server/routes/photos.js index 499ed09..d5a10eb 100755 --- a/server/routes/photos.js +++ b/server/routes/photos.js @@ -149,7 +149,7 @@ router.put("/:id", function(req, res/*, next*/) { return rename(picturesPath + asset.path + src, picturesPath + asset.path + asset.filename).then(function() { return rename(picturesPath + asset.path + "thumbs/" + src, picturesPath + asset.path + "thumbs/" + asset.filename); }).then(function() { - return rename(picturesPath + asset.path + src, picturesPath + "thumbs/scaled/" + asset.path + "thumbs/scaled/" + asset.filename); + return rename(picturesPath + asset.path + "thumbs/scaled/" + src, picturesPath + asset.path + "thumbs/scaled/" + asset.filename); }).then(function() { return photoDB.sequelize.query("UPDATE photos SET filename=:filename WHERE id=:id", { replacements: asset