TagSpaces is an offline, open source, document manager with tagging support
DnD of files in subfolders not working (#1698)
Stanimir1994bec935b6
diff --git a/app/perspectives/grid-perspective/components/MainContainer.tsx b/app/perspectives/grid-perspective/components/MainContainer.tsxindex 5287a8620..aa1584d63 100644--- a/app/perspectives/grid-perspective/components/MainContainer.tsx+++ b/app/perspectives/grid-perspective/components/MainContainer.tsx@@ -565,8 +565,8 @@ function GridPerspective(props: Props) {} else {arrPath = [mItem.path];}- console.log('Dropped files: ' + mItem.path);- props.moveFiles(arrPath, mItem.path);+ console.log('Dropped files: ' + item.path);+ props.moveFiles(arrPath, item.path);clearSelection();}};diff --git a/scripts/checkWSinstalled.js b/scripts/checkWSinstalled.jsindex f77f1f0d1..62667f675 100644--- a/scripts/checkWSinstalled.js+++ b/scripts/checkWSinstalled.js@@ -1,5 +1,7 @@#! /usr/bin/env node+const path = require('path');+const fs = require('fs-extra');const shell = require('shelljs');function isInstalled(packageName) {@@ -11,6 +13,18 @@ function isInstalled(packageName) {}}+function dirExist(dir) {+ try {+ fs.statSync(dir);+ return true;+ } catch (err) {+ if (err.code === 'ENOENT') {+ return false;+ }+ }+ return false;+}+/*function checkSharpPlatform(targetPlatform, arch) {if (!targetPlatform || !arch) {return true;@@ -29,6 +43,7 @@ function isInstalled(packageName) {let platform = 'node';let installCmd;+const dir = path.join(__dirname, '../app/node_modules');if (process.env.PD_PLATFORM) {platform = process.env.PD_PLATFORM;@@ -37,12 +52,13 @@ if (process.env.PD_PLATFORM) {if (platform === 'node') {if (//!checkSharpPlatform(process.env.TARGET_PLATFORM, process.env.TARGET_ARCH) ||+ !dirExist(dir) ||!isInstalled('@tagspaces/tagspaces-ws')) {installCmd = 'npm run-script install-ext-node';}} else if (platform === 'web') {- if (isInstalled('@tagspaces/tagspaces-ws')) {+ if (!dirExist(dir) || isInstalled('@tagspaces/tagspaces-ws')) {installCmd = 'npm run-script install-ext-web';}}