@axium/storage 0.6.5 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/server.js +4 -2
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -140,8 +140,10 @@ addRoute({
140
140
  .returningAll()
141
141
  .execute()
142
142
  .catch(withError('Could not delete item'));
143
- for (const { id } of results)
144
- unlinkSync(join(config.storage.data, id));
143
+ for (const { id, type } of results) {
144
+ if (type != 'inode/directory')
145
+ unlinkSync(join(config.storage.data, id));
146
+ }
145
147
  return item;
146
148
  },
147
149
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/storage",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "author": "James Prevett <axium@jamespre.dev> (https://jamespre.dev)",
5
5
  "description": "User file storage for Axium",
6
6
  "funding": {