Skip to content

Fix a bug in download_and_rename method#401

Merged
gregorjerse merged 3 commits intogenialis:masterfrom
marcellevstek:fix/download_and_rename
Jan 29, 2026
Merged

Fix a bug in download_and_rename method#401
gregorjerse merged 3 commits intogenialis:masterfrom
marcellevstek:fix/download_and_rename

Conversation

@marcellevstek
Copy link
Contributor

This problem affected cases when you wanted to download the same field of related data objects and wanted to avoid them being overwritten. The bug caused the code to fail when trying to rename the file names contained in the directory.

@gregorjerse gregorjerse force-pushed the fix/download_and_rename branch from 3238c4b to 7eb3ae2 Compare January 13, 2026 08:35
@marcellevstek marcellevstek force-pushed the fix/download_and_rename branch from 7eb3ae2 to 0268f9d Compare January 13, 2026 09:49
@gregorjerse gregorjerse force-pushed the fix/download_and_rename branch from 0268f9d to 7eb3ae2 Compare January 13, 2026 09:50
@marcellevstek marcellevstek force-pushed the fix/download_and_rename branch from 7eb3ae2 to 91bfb4b Compare January 13, 2026 09:55

return file_names
dir_names = self._files_dirs("dir", file_name, field_name)
if dir_names and return_dir_names:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gregorjerse this works as intended, but if a user does not specify a field or file name, only the directory names get returned. This may seem problematic, if the user expects the file names not contained in the directories to be returned as well.

@marcellevstek marcellevstek force-pushed the fix/download_and_rename branch 5 times, most recently from 8b41c1f to 6dc69e4 Compare January 29, 2026 11:41
@marcellevstek marcellevstek force-pushed the fix/download_and_rename branch from 6dc69e4 to 448c5a1 Compare January 29, 2026 11:42
@marcellevstek marcellevstek force-pushed the fix/download_and_rename branch from 448c5a1 to 1e18908 Compare January 29, 2026 11:48
@gregorjerse gregorjerse merged commit 1e18908 into genialis:master Jan 29, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants