Skip to content

Commit

Permalink
Merge branch 'inspector-files-or-folders' into dandi-files-or-folders
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmflynn authored Sep 28, 2023
2 parents 17cb82e + 6e7cd71 commit d33ec83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions pyflask/manageNeuroconv/manage_neuroconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,17 +569,19 @@ def inspect_nwb_folder(payload):
return json.loads(json.dumps(messages, cls=InspectorOutputJSONEncoder))


def aggregate_symlinks_in_new_directory(paths, reason="", folder_path = None):
if (folder_path is None):
def aggregate_symlinks_in_new_directory(paths, reason="", folder_path=None):
if folder_path is None:
folder_path = GUIDE_ROOT_FOLDER / ".temp" / reason / f"temp_{datetime.now().strftime('%Y%m%d-%H%M%S')}"

folder_path.mkdir(parents=True)

for path in paths:
path = Path(path)
new_path = folder_path / path.name
if (path.is_dir()):
aggregate_symlinks_in_new_directory(list(map(lambda name: os.path.join(path, name), os.listdir(path))), None, new_path)
if path.is_dir():
aggregate_symlinks_in_new_directory(
list(map(lambda name: os.path.join(path, name), os.listdir(path))), None, new_path
)
else:
new_path.symlink_to(path, path.is_dir())

Expand Down
2 changes: 1 addition & 1 deletion src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const exitPyProc = async () => {
const killAllPreviousProcesses = async () => {

const fetch = globalThis.fetch

if (fetch){
console.log("Killing all previous processes");

Expand Down

0 comments on commit d33ec83

Please sign in to comment.