@gallop.software/studio 2.3.45 → 2.3.46
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 +14 -4
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -1808,6 +1808,7 @@ async function handleMoveStream(request) {
|
|
|
1808
1808
|
const itemCdnUrl = isItemInCloud ? cdnUrls[itemEntry.c] : void 0;
|
|
1809
1809
|
const isItemInR2 = isItemInCloud && itemCdnUrl === r2PublicUrl;
|
|
1810
1810
|
const itemHasThumbnails = isProcessed(itemEntry);
|
|
1811
|
+
let vItemMoved = false;
|
|
1811
1812
|
if (isItemInR2) {
|
|
1812
1813
|
try {
|
|
1813
1814
|
const itemLocalPath = getPublicPath(vItem.newKey);
|
|
@@ -1839,12 +1840,16 @@ async function handleMoveStream(request) {
|
|
|
1839
1840
|
if (itemHasThumbnails) {
|
|
1840
1841
|
await deleteLocalThumbnails(vItem.newKey);
|
|
1841
1842
|
}
|
|
1843
|
+
vItemMoved = true;
|
|
1842
1844
|
} catch (err) {
|
|
1843
1845
|
console.error(`Failed to move cloud item ${vItem.oldKey}:`, err);
|
|
1846
|
+
delete meta[vItem.oldKey];
|
|
1844
1847
|
}
|
|
1845
1848
|
}
|
|
1846
|
-
|
|
1847
|
-
|
|
1849
|
+
if (vItemMoved) {
|
|
1850
|
+
delete meta[vItem.oldKey];
|
|
1851
|
+
meta[vItem.newKey] = itemEntry;
|
|
1852
|
+
}
|
|
1848
1853
|
processedFiles++;
|
|
1849
1854
|
sendEvent({
|
|
1850
1855
|
type: "progress",
|
|
@@ -2120,6 +2125,7 @@ async function handleMoveStream(request) {
|
|
|
2120
2125
|
const cloudCdnUrl = cloudIsInCloud ? cdnUrls[cloudEntry.c] : void 0;
|
|
2121
2126
|
const cloudIsInR2 = cloudIsInCloud && cloudCdnUrl === r2PublicUrl;
|
|
2122
2127
|
const cloudHasThumbs = isProcessed(cloudEntry);
|
|
2128
|
+
let cloudFileMoved = false;
|
|
2123
2129
|
if (cloudIsInR2) {
|
|
2124
2130
|
try {
|
|
2125
2131
|
const cloudLocalPath = getPublicPath(cloudFile.newKey);
|
|
@@ -2152,12 +2158,16 @@ async function handleMoveStream(request) {
|
|
|
2152
2158
|
await deleteLocalThumbnails(cloudFile.newKey);
|
|
2153
2159
|
}
|
|
2154
2160
|
await deleteEmptyFolders(path6.dirname(cloudLocalPath));
|
|
2161
|
+
cloudFileMoved = true;
|
|
2155
2162
|
} catch (err) {
|
|
2156
2163
|
console.error(`Failed to move cloud file ${cloudFile.oldKey}:`, err);
|
|
2164
|
+
delete meta[cloudFile.oldKey];
|
|
2157
2165
|
}
|
|
2158
2166
|
}
|
|
2159
|
-
|
|
2160
|
-
|
|
2167
|
+
if (cloudFileMoved) {
|
|
2168
|
+
delete meta[cloudFile.oldKey];
|
|
2169
|
+
meta[cloudFile.newKey] = cloudEntry;
|
|
2170
|
+
}
|
|
2161
2171
|
processedFiles++;
|
|
2162
2172
|
sendEvent({
|
|
2163
2173
|
type: "progress",
|