keystone-classic
keystone-classic copied to clipboard
fix file deletion
Fixes issue #4946.
Could you please guide us through your changes?
I just corrected the behavior of the script according to the code that someone had written earlier.
-
The
storage.removeFileinterface assumes the presence of the callback function, it is added. But the deletion method passes an empty function so as not to change the logic ofstorage.removeFile. -
The value of the value variable in the
updateItemmethod is always an empty string at deletion. -
Method
utils.defer(callback)is called later (by code) in case of deleting a file, so it is redundant and causes an error. -
Also added is the deletion of the file before uploading a new one (implementation of the file replacement, which also did not work before).