#506 fix: Deleting a file does not delete from fs.files (#1758)

* #506 fix: Deleting a file does not delete from fs.files

* test added to check that GridStoreAdapter deleteFile removes from fs.files and fs.chunks
This commit is contained in:
David Keita
2016-06-27 06:40:43 +02:00
committed by Florent Vilmart
parent b7d15cc37f
commit 19080ed7e7
2 changed files with 88 additions and 1 deletions

View File

@@ -43,7 +43,7 @@ export class GridStoreAdapter extends FilesAdapter {
deleteFile(filename: string) {
return this._connect().then(database => {
let gridStore = new GridStore(database, filename, 'w');
let gridStore = new GridStore(database, filename, 'r');
return gridStore.open();
}).then((gridStore) => {
return gridStore.unlink();