TagSpaces is an offline, open source, document manager with tagging support
fix path undefined onCancel and e2e
sytolkd6d9b17ba10d
diff --git a/scripts/extconfig-objectstore-location.js b/scripts/extconfig-objectstore-location.jsindex d51ca2882..1a8c1c952 100644--- a/scripts/extconfig-objectstore-location.js+++ b/scripts/extconfig-objectstore-location.js@@ -4,7 +4,7 @@ window.ExtUseGenerateThumbnails = true;window.ExtLocationsReadOnly = false;window.ExtSaveLocationsInBrowser = true;window.ExtLocations = [- {+ /*{uuid: '40565f09-c7fd-2333-fc67-a75db27rt5ba', // an unique id of the locationtype: '1', // 1 defines the locations a cloud basedname: 'supported-filestypes-s3', // the name of the location@@ -22,7 +22,7 @@ window.ExtLocations = [maxIndexAge: 600000,maxLoops: 2,creationDate: '2024-06-01T08:46:50.449Z',- },+ },*/{uuid: '30565f09-c7fd-2333-fc67-a75db27rt5ba', // an unique id of the locationtype: '0', // 1 defines the locations a cloud baseddiff --git a/src/renderer/components/dialogs/components/LocalForm.tsx b/src/renderer/components/dialogs/components/LocalForm.tsxindex 5550965da..e83afd295 100644--- a/src/renderer/components/dialogs/components/LocalForm.tsx+++ b/src/renderer/components/dialogs/components/LocalForm.tsx@@ -46,15 +46,17 @@ function LocalForm(props: Props) {const openDirectory = () => {selectDirectoryDialog().then((selectedPaths) => {- const selectedPath = decodeURI(selectedPaths[0]);- setPath(selectedPath);- if (name.length < 1 && selectedPath.length > 0) {- const currentLocation = findLocation();- const dirName = extractDirectoryName(- selectedPath,- currentLocation?.getDirSeparator(),- );- setName(dirName.charAt(0).toUpperCase() + dirName.slice(1));+ if (selectedPaths && selectedPaths.length > 0) {+ const selectedPath = decodeURI(selectedPaths[0]);+ setPath(selectedPath);+ if (name.length < 1 && selectedPath.length > 0) {+ const currentLocation = findLocation();+ const dirName = extractDirectoryName(+ selectedPath,+ currentLocation?.getDirSeparator(),+ );+ setName(dirName.charAt(0).toUpperCase() + dirName.slice(1));+ }}return true;})diff --git a/src/renderer/hooks/CurrentLocationContextProvider.tsx b/src/renderer/hooks/CurrentLocationContextProvider.tsxindex c8edd49e0..c2e418adb 100644--- a/src/renderer/hooks/CurrentLocationContextProvider.tsx+++ b/src/renderer/hooks/CurrentLocationContextProvider.tsx@@ -499,11 +499,7 @@ export const CurrentLocationContextProvider = ({}function editLocationInt(location: CommonLocation, openAfterEdit = false) {- /*allLocations.current = allLocations.current.map((l) =>- l.uuid === location.uuid ? location : l,- );*/dispatch(LocationActions.changeLocation(location));- //forceUpdate();if (openAfterEdit) {currentLocationId.current = location.uuid;/*diff --git a/src/renderer/hooks/DirectoryContentContextProvider.tsx b/src/renderer/hooks/DirectoryContentContextProvider.tsxindex 52fce00bb..97f23c245 100644--- a/src/renderer/hooks/DirectoryContentContextProvider.tsx+++ b/src/renderer/hooks/DirectoryContentContextProvider.tsx@@ -908,10 +908,6 @@ export const DirectoryContentContextProvider = ({location: CommonLocation,showHiddenEntries = undefined,): Promise<TS.FileSystemEntry[]> {- /*const uploadCancelled = new Promise((_resolve, reject) => {- signal.addEventListener('abort', () => reject());- });*/-showNotification(t('core:loading'), 'info', false);const resultsLimit = {maxLoops:diff --git a/tests/e2e/objectstore.pw.e2e.js b/tests/e2e/objectstore.pw.e2e.jsindex 08cb5db29..563805b70 100644--- a/tests/e2e/objectstore.pw.e2e.js+++ b/tests/e2e/objectstore.pw.e2e.js@@ -43,7 +43,7 @@ test.beforeEach(async ({ isS3 }) => {} else {await closeWelcomePlaywright();await clickOn('[data-tid=locationManager]');- await clickOn('[data-tid=location_' + defaultLocationName + '-s3]');+ await clickOn('[data-tid=location_' + defaultLocationName + ']'); // + '-s3]');}});