@axium/storage 0.16.3 → 0.16.4
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/item.js +4 -0
- package/package.json +1 -1
package/dist/server/item.js
CHANGED
|
@@ -101,7 +101,11 @@ export function startUpload(init, session) {
|
|
|
101
101
|
mkdirSync(temp_dir, { recursive: true });
|
|
102
102
|
const file = join(temp_dir, token.toHex());
|
|
103
103
|
const fd = openSync(file, 'a');
|
|
104
|
+
let removed = false;
|
|
104
105
|
function remove() {
|
|
106
|
+
if (removed)
|
|
107
|
+
return;
|
|
108
|
+
removed = true;
|
|
105
109
|
inProgress.delete(token.toBase64());
|
|
106
110
|
closeSync(fd);
|
|
107
111
|
}
|