TagSpaces is an offline, open source, document manager with tagging support
fix: AWS clear folder name on DnD (#1405)
Stanimir1ac5f00867db
diff --git a/app/perspectives/grid-perspective/components/MainContainer.tsx b/app/perspectives/grid-perspective/components/MainContainer.tsxindex 0bb0b95e1..9fb5ee46a 100644--- a/app/perspectives/grid-perspective/components/MainContainer.tsx+++ b/app/perspectives/grid-perspective/components/MainContainer.tsx@@ -533,14 +533,19 @@ const GridPerspective = (props: Props) => {}if (monitor) {const { path, selectedEntries } = monitor.getItem();- const arrPath = [];+ let arrPath;if (selectedEntries && selectedEntries.length > 0) {- selectedEntries.map(entry => {- arrPath.push(entry.path);- return true;- });+ const arrSelected = selectedEntries+ .map(entry => entry.path)+ // remove target folder selection+ .filter(epath => epath !== item.path);+ if (arrSelected.length > 0) {+ arrPath = arrSelected;+ } else {+ arrPath = [path];+ }} else {- arrPath.push(path);+ arrPath = [path];}console.log('Dropped files: ' + path);props.moveFiles(arrPath, item.path);diff --git a/package.json b/package.jsonindex 0a6749299..7b8917034 100644--- a/package.json+++ b/package.json@@ -99,7 +99,8 @@"minio-start": "./tests/bin/minio server ./tests/testdata/file-structure","minio-start-windows": "./tests/bin/minio.exe server ./tests/testdata/file-structure","start-chrome-driver": "./node_modules/.bin/chromedriver --url-base=/ --port=9515 --no-sandbox --disable-dev-shm-usage",- "setup-tests": "node scripts/setup-tests.js"+ "setup-tests": "node scripts/setup-tests.js",+ "browserslist:update": "npx browserslist@latest --update-db"},"repository": {"type": "git",diff --git a/yarn.lock b/yarn.lockindex b32c1d459..20cb53739 100644--- a/yarn.lock+++ b/yarn.lock@@ -5958,15 +5958,10 @@ caniuse-db@^1.0.30000935:resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30001125.tgz#624d973e2c221ff6fd10b170fb04f4c718601a80"integrity sha512-MN6D6aNZV8AGq5erwkaonrHBGe2dwkkQIqsPAuU6DtqqSngw6rhUhRhbSZib6cS9mrS0OSB2gmioaMrcz0tZSQ==-caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001124:- version "1.0.30001125"- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001125.tgz#2a1a51ee045a0a2207474b086f628c34725e997b"- integrity sha512-9f+r7BW8Qli917mU3j0fUaTweT3f3vnX/Lcs+1C73V+RADmFme+Ih0Br8vONQi3X0lseOe6ZHfsZLCA8MSjxUA==--caniuse-lite@^1.0.30001157:- version "1.0.30001161"- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001161.tgz#64f7ffe79ee780b8c92843ff34feb36cea4651e0"- integrity sha512-JharrCDxOqPLBULF9/SPa6yMcBRTjZARJ6sc3cuKrPfyIk64JN6kuMINWqA99Xc8uElMFcROliwtz0n9pYej+g==+caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001124, caniuse-lite@^1.0.30001157:+ version "1.0.30001219"+ resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001219.tgz"+ integrity sha512-c0yixVG4v9KBc/tQ2rlbB3A/bgBFRvl8h8M4IeUbqCca4gsiCfvtaheUssbnux/Mb66Vjz7x8yYjDgYcNQOhyQ==canvas@^2.6.1:version "2.6.1"