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

Renaming scenes/external events creates duplicate files in the project directory #4120

Closed
ghost opened this issue Jul 20, 2022 · 3 comments · Fixed by #6501
Closed

Renaming scenes/external events creates duplicate files in the project directory #4120

ghost opened this issue Jul 20, 2022 · 3 comments · Fixed by #6501
Labels
🐛 bug This is a bug impacting users 👌good first issue Good issue if you want to start contributing to GDevelop

Comments

@ghost
Copy link

ghost commented Jul 20, 2022

Describe the bug

When a project uses the 'multiple files' setting, and you rename a scene or external event from the UI, a new file is created in the project directory (as expected), but the old one remains too. This causes duplicates and confusion.

To Reproduce

  1. Create a new, blank project and set the 'Project file type' setting/property to 'Multiple files'
  2. Create a scene and an external event (leave them with the default names
  3. Save and verify the correct files are in the project directory
  4. Rename the scene and external event
  5. Save and check the project directory - note the old files are there along with the new ones

image

image

image

image

Other details

GDevelop v5.0.138 running on Manjaro Linux (KDE Plasma v5.24.6)

@willianholtz
Copy link

willianholtz commented Jul 20, 2022

I noticed this a while ago too! I was going to report this, but I forgot! Now that you've commented, I can confirm that it happens to me too. I've noticed this since several builds ago!

OS. Arch Linux
GDevelop v5.0.139

PS: Something similar happens in a topic opened by me a while ago! #3131

@Bouh Bouh added 🐛 bug This is a bug impacting users 👌good first issue Good issue if you want to start contributing to GDevelop labels Jul 21, 2022
@Oxey405
Copy link
Contributor

Oxey405 commented Sep 13, 2022

Hey ! Is someone working on it or can I try to fix that ?

@4ian
Copy link
Owner

4ian commented Sep 13, 2022

You can try but this will involve removing files which is risky - you'll need a strong and robust solution here :)

DavidMLPalma added a commit to DavidMLPalma/GDevelop that referenced this issue Apr 3, 2024
…al layouts , duplicate files exist.

When renaming scenes/extensions/external events/external layouts,
duplicate files exist, one with the old name and one with the new name.
When deleting this items, the respective files are also not removed from
the project directory. This is due to the fact that when saving the
project, only the existing files in the project editor are written and saved, and the old ones
still remain, potentialy creating duplicates and confusion. Therefore, when saving,
we can resolve this issue by deleting all files from the
scenes/extensions/external events/external layouts directories, before
writing the correct files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug This is a bug impacting users 👌good first issue Good issue if you want to start contributing to GDevelop
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants