You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
try{returnnewPromise(resolve=>{// ... do stuffresolve())}catch(error){logger.error('spx.writeFile - Error while saving: '+filepath+': '+error);return}
The try block will never fail, as the promise doesn't execute immediately
It should be:
returnnewPromise((resolve,reject)=>{try{// ... do stuffresolve();}catch(error){logger.error('spx.duplicateFile - Error while duplicating: '+fileRefe+': '+error);reject();}})
The text was updated successfully, but these errors were encountered:
Dan-Shields
changed the title
writeFile, writeTextFile and renameRundown, GetJsonData are unsafe
writeFile, writeTextFile and renameRundown are unsafe
Jan 23, 2024
All of these functions follow this pattern:
The try block will never fail, as the promise doesn't execute immediately
It should be:
The text was updated successfully, but these errors were encountered: