Skip to content

Commit

Permalink
keepExistingData for firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Aug 1, 2023
1 parent 5b87295 commit 3e3f65a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/tw-restore-point-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ const writeFile = async (directory, filename, data) => {
const fileHandle = await directory.getFileHandle(filename, {
create: true
});
const writable = await fileHandle.createWritable();
const writable = await fileHandle.createWritable({
// TODO: Firefox seems to not do this by default?
keepExistingData: false
});
await writable.write(data);
await writable.close();
};
Expand Down

0 comments on commit 3e3f65a

Please sign in to comment.