Closed dieseldjango closed 4 years ago
Internally, the operation should be synchronous. However, and as it seems, the overall behaviour of the node fs api was changed. We will need to investigate this.
This was fixed in #198 I believe.
However, I will look into the callback once again.
You are right. The callback returned is async. Let's see how we can fix this.
This might boil down to #198, still.
@dieseldjango you might want to try with latest master, which has the fix for #198 in place.
No, it was not fixed with #198:
const removeCallback = _prepareRemoveCallback(_removeFileAsync, [fd, name], removeCallbackSync);
as it will use the async API for removing the file.
Perhaps we can even get rid of some code here, if we make this sync instead of async and sync on cleanup.
I think that with the two available interfaces, one sync and the other async, the two should return sync and async callbacks, respectively.
Operating System
NodeJS Version
Tmp Version
0.1.0
Expected Behavior
removeCallback()
is described as synchronous. Running the code above, I would expect both console.log statements checking for the removed file to returnfalse
.Experienced Behavior
removeCallback()
isn't really synchronous, it is just an asynchronous operation that doesn't provide a promise or callback. Is this the intended behavior?