Conversation
|
@tjanas can I get this looked at? Do you need me to file an issue to go with it or something? |
|
I would ask @frederic-mahe instead |
|
@blathers16 I am really sorry for not looking at your pull request earlier. I was hoping to refactor my Before merging your new option, there are a few things that could be improved or clarified. I hope you won't mind. For instance, that check could be done only once, rather than for each file in the source folder: # create directory structure if need be
if not os.path.exists(new_path):
os.makedirs(new_path, exist_ok=True)Also, there is a possibility that someone will put the Finally, I am not sure to understand your strategy when there are multiple source files with the same name. You add part of the hash value to the filename |
|
Hi, @frederic-mahe |
|
Hi, @frederic-mahe, sorry to revive this from the dead. I've been rather busy with life and forgot about it. I could recreate the folders if you want, but I felt the other option was simpler, and in general, I prefer simple solutions as there is less to go wrong. Please let me know if there is anything you would like me to do to get this merged. |
|
Hi, @frederic-mahe. Given further thought, I decided to give the user the option of whether to append a hash or preserve the folder structure. I also fixed an issue with relative folder paths. Please let me know if any additional changes are needed. |
This pull request is to allow copying files found in the source directory that are not found in the database to a designated folder when running the build pack script.
The rationale behind this is that you may have a bunch of ROMs from various sources randomly mixed together. Since there is no guarantee that these databases will always have every ROM in existence in them, with this change any roms from the source folder will either end up in the build pack or in the extras folder.
The user can then safely keep only a copy of the built pack and the extras folder with the knowledge that they haven't deleted any ROMs from the source that are not yet in the db.
This can also help in keeping the db up to date, as any files that end up in the extras folder can be investigated to determine whether they need to be added to the db.