MatrixAI / js-encryptedfs

Encrypted Filesystem for TypeScript/JavaScript Applications
https://polykey.com
Apache License 2.0
10 stars 3 forks source link

unlinkSync does not unlink lower directory #31

Closed robert-cronin closed 4 years ago

robert-cronin commented 4 years ago

unlinkSync only unlinks upper directory

robert-cronin commented 4 years ago

we also need to put something in these methods to ensure the file exists in the upperDir before unlinking it. This is causing an error when efs is used in isomorphic-git and since the library doesn't expose the file system errors to the end user, it took a while to realise what was going on. The error happens when isogit tries to unlink removed files in a pull request. I might just submit a quick fix on master and release a new patch to npm. Pretty simple fix.

robert-cronin commented 4 years ago

Fixed with patch 1.0.2