summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/common/add-file-to-drive.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/common/add-file-to-drive.ts b/src/api/common/add-file-to-drive.ts
index 427b54d72b..23cbc44e61 100644
--- a/src/api/common/add-file-to-drive.ts
+++ b/src/api/common/add-file-to-drive.ts
@@ -266,11 +266,11 @@ export default (user: any, file: string | stream.Readable, ...args) => new Promi
}
rej(new Error('un-compatible file.'));
})
- .then(([path, remove]): Promise<any> => new Promise((res, rej) => {
+ .then(([path, shouldCleanup]): Promise<any> => new Promise((res, rej) => {
addFile(user, path, ...args)
.then(file => {
res(file);
- if (remove) {
+ if (shouldCleanup) {
fs.unlink(path, (e) => {
if (e) log(e.stack);
});