@gallop.software/studio 2.3.41 → 2.3.43
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 +21 -0
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -1841,6 +1841,10 @@ async function handleMoveStream(request) {
|
|
|
1841
1841
|
currentFile: path6.basename(vItem.newKey)
|
|
1842
1842
|
});
|
|
1843
1843
|
}
|
|
1844
|
+
const newFolderPath = getPublicPath(newKey);
|
|
1845
|
+
await deleteEmptyFolders(newFolderPath);
|
|
1846
|
+
const newThumbFolder = path6.join(getPublicPath("images"), newKey.slice(1));
|
|
1847
|
+
await deleteEmptyFolders(newThumbFolder);
|
|
1844
1848
|
moved.push(itemPath);
|
|
1845
1849
|
continue;
|
|
1846
1850
|
}
|
|
@@ -1912,6 +1916,11 @@ async function handleMoveStream(request) {
|
|
|
1912
1916
|
if (hasProcessedThumbnails) {
|
|
1913
1917
|
await deleteLocalThumbnails(newKey);
|
|
1914
1918
|
}
|
|
1919
|
+
await deleteEmptyFolders(path6.dirname(newAbsolutePath));
|
|
1920
|
+
if (hasProcessedThumbnails) {
|
|
1921
|
+
const newThumbRelPath = newKey.slice(1);
|
|
1922
|
+
await deleteEmptyFolders(path6.join(getPublicPath("images"), newThumbRelPath));
|
|
1923
|
+
}
|
|
1915
1924
|
newEntry.c = entry?.c;
|
|
1916
1925
|
delete meta[oldKey];
|
|
1917
1926
|
meta[newKey] = newEntry;
|
|
@@ -1998,6 +2007,18 @@ async function handleMoveStream(request) {
|
|
|
1998
2007
|
delete meta[key];
|
|
1999
2008
|
}
|
|
2000
2009
|
}
|
|
2010
|
+
const oldThumbRelPath = oldKey.slice(1);
|
|
2011
|
+
const newThumbRelPath = newKey.slice(1);
|
|
2012
|
+
const imagesDir = getPublicPath("images");
|
|
2013
|
+
const oldThumbFolder = path6.join(imagesDir, oldThumbRelPath);
|
|
2014
|
+
const newThumbFolder = path6.join(imagesDir, newThumbRelPath);
|
|
2015
|
+
try {
|
|
2016
|
+
await fs6.access(oldThumbFolder);
|
|
2017
|
+
sourceFolders.add(oldThumbFolder);
|
|
2018
|
+
await fs6.mkdir(path6.dirname(newThumbFolder), { recursive: true });
|
|
2019
|
+
await fs6.rename(oldThumbFolder, newThumbFolder);
|
|
2020
|
+
} catch {
|
|
2021
|
+
}
|
|
2001
2022
|
}
|
|
2002
2023
|
moved.push(itemPath);
|
|
2003
2024
|
if (stats.isDirectory()) {
|