@gallop.software/studio 2.3.37 → 2.3.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/index.js +12 -1
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -1511,6 +1511,15 @@ async function handleRenameStream(request) {
|
|
|
1511
1511
|
sendEvent({ type: "start", total, message: `Renaming folder with ${itemsToUpdate.length} item(s)...` });
|
|
1512
1512
|
if (hasLocalItem) {
|
|
1513
1513
|
await fs6.rename(absoluteOldPath, absoluteNewPath);
|
|
1514
|
+
const imagesDir = getPublicPath("/images");
|
|
1515
|
+
const oldThumbFolder2 = path6.join(imagesDir, oldRelativePath);
|
|
1516
|
+
const newThumbFolder = path6.join(imagesDir, newRelativePath);
|
|
1517
|
+
try {
|
|
1518
|
+
await fs6.access(oldThumbFolder2);
|
|
1519
|
+
await fs6.mkdir(path6.dirname(newThumbFolder), { recursive: true });
|
|
1520
|
+
await fs6.rename(oldThumbFolder2, newThumbFolder);
|
|
1521
|
+
} catch {
|
|
1522
|
+
}
|
|
1514
1523
|
}
|
|
1515
1524
|
sendEvent({ type: "progress", current: 1, total, renamed: 1, message: "Renamed folder" });
|
|
1516
1525
|
let renamed = 1;
|
|
@@ -1588,7 +1597,9 @@ async function handleRenameStream(request) {
|
|
|
1588
1597
|
});
|
|
1589
1598
|
}
|
|
1590
1599
|
await saveMeta(meta);
|
|
1591
|
-
await deleteEmptyFolders(
|
|
1600
|
+
await deleteEmptyFolders(absoluteOldPath);
|
|
1601
|
+
const oldThumbFolder = path6.join(getPublicPath("/images"), oldRelativePath);
|
|
1602
|
+
await deleteEmptyFolders(oldThumbFolder);
|
|
1592
1603
|
sendEvent({ type: "complete", renamed, newPath });
|
|
1593
1604
|
controller.close();
|
|
1594
1605
|
return;
|