@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.
- package/dist/access.js +3 -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
|
-
|
|
170
|
+
if (offset < inode.size)
|
|
171
|
+
await writable.seek(offset);
|
|
171
172
|
}
|
|
172
173
|
catch {
|
|
173
174
|
await writable.write({ type: 'seek', position: offset });
|