🐎 Do not delete partial patch files from previous runs
This commit is contained in:
parent
f6298af4c4
commit
b277d81aa1
1 changed files with 11 additions and 6 deletions
|
@ -11,7 +11,11 @@ export default function checkLocalCache(fileName: string, size: number): Promise
|
|||
if (fileStats.size === size) {
|
||||
resolve(true);
|
||||
} else {
|
||||
//delete file so we can overwrite it
|
||||
//TODO: use checksum to verify that file is correct
|
||||
if (true) {
|
||||
resolve(false);
|
||||
} else {
|
||||
//file is incorrect; delete it so we can overwrite it
|
||||
fs.unlink(fileName, function(error) {
|
||||
if (error) {
|
||||
reject(error);
|
||||
|
@ -19,6 +23,7 @@ export default function checkLocalCache(fileName: string, size: number): Promise
|
|||
resolve(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
resolve(false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue