@zenfs/dom 1.2.6 → 1.2.7

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/access.js +3 -2
  2. package/package.json +1 -1
package/dist/access.js CHANGED
@@ -165,9 +165,10 @@ export class WebAccessFS extends Async(IndexFS) {
165
165
  log.crit(withErrno('EIO', 'Mismatch in entry kind on write'));
166
166
  return;
167
167
  }
168
- const writable = await handle.createWritable();
168
+ const writable = await handle.createWritable({ keepExistingData: true });
169
169
  try {
170
- await writable.seek(offset);
170
+ if (offset < inode.size)
171
+ await writable.seek(offset);
171
172
  }
172
173
  catch {
173
174
  await writable.write({ type: 'seek', position: offset });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenfs/dom",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "DOM backends for ZenFS",
5
5
  "funding": {
6
6
  "type": "individual",