@lvce-editor/explorer-view 2.44.0 → 2.45.0

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.
@@ -978,10 +978,10 @@ const createNewDirentsAccept = async (newFileName, pathSeparator, absolutePath,
978
978
  await createNestedPath(root, parentPath, pathSeparator);
979
979
  }
980
980
  await createFn(absolutePath);
981
- return true;
981
+ return '';
982
982
  } catch (error) {
983
983
  console.error(new VError(error, `Failed to create file`));
984
- return false;
984
+ return `${error}`;
985
985
  }
986
986
  };
987
987
 
@@ -1481,9 +1481,12 @@ const acceptCreate = async (state, newDirentType, createFn) => {
1481
1481
  }
1482
1482
  const parentFolder = getParentFolder(items, focusedIndex, root);
1483
1483
  const absolutePath = join2(parentFolder, newFileName);
1484
- const successful = await createNewDirentsAccept(newFileName, pathSeparator, absolutePath, root, createFn);
1485
- if (!successful) {
1486
- return state;
1484
+ const createErrorMessage = await createNewDirentsAccept(newFileName, pathSeparator, absolutePath, root, createFn);
1485
+ if (createErrorMessage) {
1486
+ return {
1487
+ ...state,
1488
+ editingErrorMessage: createErrorMessage
1489
+ };
1487
1490
  }
1488
1491
  const pathPaths = getPathParts(root, absolutePath, pathSeparator);
1489
1492
  const children = await getPathPartsChildren(pathPaths);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/explorer-view",
3
- "version": "2.44.0",
3
+ "version": "2.45.0",
4
4
  "description": "Explorer Worker",
5
5
  "repository": {
6
6
  "type": "git",