Skip to content

Commit 6da467d

Browse files
committed
wip: Disallow empty folders and files from being imported
1 parent ac3a7f8 commit 6da467d

File tree

9 files changed

+122
-155
lines changed

9 files changed

+122
-155
lines changed

.github/workflows/Build-and-deploy-linux.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- main
88
- staging
99
- pre-staging
10-
- v-2019-pennsieve-agent-patch
10+
- empty-folders-files-hotfix
1111

1212
jobs:
1313
deploy-on-linux:

.github/workflows/Build-and-deploy-mac.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- main
88
- staging
99
- pre-staging
10-
- v-2019-pennsieve-agent-patch
10+
- empty-folders-files-hotfix
1111

1212
jobs:
1313
deploy-on-mac:

.github/workflows/Build-and-deploy-win.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- main
88
- staging
99
- pre-staging
10-
- v-2019-pennsieve-agent-patch
10+
- empty-folders-files-hotfix
1111

1212
jobs:
1313
deploy-on-windows:

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "soda-for-sparc",
33
"procductName": "SODA for SPARC",
4-
"version": "15.2.4-beta",
4+
"version": "15.2.7-beta",
55
"description": "Keep Calm and Curate",
66
"main": "./out/main/index.js",
77
"author": "SODA Team",

src/pyflask/startup/minimumApiVersion.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ def get_api_version():
99

1010

1111

12-
return {'version': os.getenv('API_VERSION', "15.2.4-beta")}
12+
return {'version': os.getenv('API_VERSION', "15.2.7-beta")}
1313

1414

src/renderer/src/scripts/organize-dataset/curate-functions.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -502,15 +502,18 @@ window.uploadDatasetClickHandler = async (ev) => {
502502
};
503503

504504
window.handleLocalDatasetImport = async (path) => {
505+
console.log("Importing local dataset from path:", path);
505506
const list = await getFilesAndFolders(path);
507+
console.log("List of files and folders:", list);
506508
const currentFileExplorerPath = window.organizeDSglobalPath.value.trim();
507-
const buildDatasetStructure = await window.buildDatasetStructureJsonFromImportedData(
509+
console.log("Current file explorer path:", currentFileExplorerPath);
510+
const builtDatasetStructure = await window.buildDatasetStructureJsonFromImportedData(
508511
list.folders,
509-
currentFileExplorerPath,
512+
"dataset_root/", // Use dataset_root as the root folder since we are importing the root in this case
510513
true
511514
);
512515

513-
window.sodaJSONObj["dataset-structure"] = buildDatasetStructure[0];
516+
window.sodaJSONObj["dataset-structure"] = builtDatasetStructure[0];
514517
window.sodaJSONObj["metadata-files"] = list.files;
515518
const forbiddenFileNames = [];
516519
const problematicFiles = [];
@@ -604,7 +607,7 @@ window.handleLocalDatasetImport = async (path) => {
604607
window.sodaJSONObj = await window.addManifestDetailsToDatasetStructure(
605608
window.sodaJSONObj,
606609
list.manifestFiles,
607-
buildDatasetStructure
610+
builtDatasetStructure
608611
);
609612

610613
return true;

0 commit comments

Comments
 (0)