Skip to content

Commit

Permalink
wip: Allow hidden files in dataset root and code folder
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobiClark committed Oct 17, 2024
1 parent 07dc8dd commit c98d957
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17698,7 +17698,7 @@ const createTestDataset = (
}
};

const continueHackGm = true;
const continueHackGm = false;

const doTheHack = async () => {
console.log("Doing the hack");
Expand Down
10 changes: 8 additions & 2 deletions src/renderer/src/scripts/others/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4432,10 +4432,16 @@ window.buildDatasetStructureJsonFromImportedData = async (

const fileIsHidden = window.evaluateStringAgainstSdsRequirements(
fileName,
"file-is-hidden"
"is-hidden-file"
);
if (fileIsHidden) {
hiddenItems.push(fileObject);
// Hidden files are allowed in the dataset_root/ and dataset_root/code/ directories
const allowedHiddenFilePaths = new Set(["dataset_root/", "dataset_root/code/"]);

// Check if the current path is not allowed for hidden files
if (!allowedHiddenFilePaths.has(currentStructurePath)) {
hiddenItems.push(fileObject);
}
}

// Add the file to the current structure
Expand Down

0 comments on commit c98d957

Please sign in to comment.