@lvce-editor/editor-worker 19.55.1 → 19.55.2

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.
@@ -6443,6 +6443,10 @@ const getNewEditor = async editor => {
6443
6443
  return editor;
6444
6444
  };
6445
6445
 
6446
+ const isReadonlyFile = async uri => {
6447
+ return invoke$a('FileSystem.isReadonly', uri);
6448
+ };
6449
+
6446
6450
  const isUntitledFile = uri => {
6447
6451
  return uri.startsWith('untitled:');
6448
6452
  };
@@ -6505,6 +6509,9 @@ const save = async editor => {
6505
6509
  platform,
6506
6510
  uri
6507
6511
  } = editor;
6512
+ if (!isUntitledFile(uri) && (await isReadonlyFile(uri))) {
6513
+ return editor;
6514
+ }
6508
6515
  const newEditor = await getNewEditor(editor);
6509
6516
  const content = applyLineEndings(getText$1(newEditor), newEditor.endOfLine);
6510
6517
  if (isUntitledFile(uri)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "19.55.1",
3
+ "version": "19.55.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"