Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply_change_to_project: Fix adding file to target with existing name. #105

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

byohay
Copy link
Collaborator

@byohay byohay commented Jul 1, 2023

The bug was reported here: #104
Basically, when a file with a name that already exists is added to a
target, the search for the file only took into account the filename.
Instead, the file is searched for in change_source_project and its
group path is taken from there.

As a sidenote - Adding the UUID would also help, but would create other
sorts of problems because UUIDs are not always consistent between
project saves.

@byohay byohay linked an issue Jul 1, 2023 that may be closed by this pull request
@ashdnazg
Copy link
Member

ashdnazg commented Jul 2, 2023

Couldn't this swap the files?

@byohay byohay force-pushed the feature/fix-same-filename-different-target branch from 3f561fc to 0e63203 Compare July 14, 2023 13:22
The bug was reported here: #104
Basically, when a file with a name that already exists is added to a
target, the search for the file only took into account the filename.
Instead, the file is searched for in `change_source_project` and its
group path is taken from there.

As a sidenote - Adding the UUID would also help, but would create other
sorts of problems because UUIDs are not always consistent between
project saves.
@byohay byohay force-pushed the feature/fix-same-filename-different-target branch from 0e63203 to 5f6e2e5 Compare July 14, 2023 13:28
Copy link
Member

@ashdnazg ashdnazg left a comment

Choose a reason for hiding this comment

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

code is ok, although a bit repetitive.
I'm not sure if there's a better option.

@byohay byohay merged commit bf01410 into main Jul 17, 2023
1 check passed
@byohay byohay deleted the feature/fix-same-filename-different-target branch July 17, 2023 19:01
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.

Bad handling of files with the same name in different targets
2 participants