alucryd / oxyromon

Rusty ROM OrgaNizer
Other
121 stars 13 forks source link

Error: SimpleError { err: "Failed to rename .... #32

Closed monyarm closed 2 years ago

monyarm commented 2 years ago

I set my ROMDIRECTORY to /mnt/Games, imported a dat file, and then ran

oxyromon import-roms ~/Downloads/Megaman\ Battle\ Network\ \(U\)\ \[\!\].zip             
Processing "/home/monyarm/Downloads/Megaman Battle Network (U) [!].zip"
Processing "Megaman Battle Network (U) [!].gba"
Matches "Mega Man Battle Network (USA).gba"
Renaming "Megaman Battle Network (U) [!].gba" to "Mega Man Battle Network (USA).gba"
Moving to "/mnt/Games/Nintendo - Game Boy Advance/Mega Man Battle Network (USA).gba.zip"
Error: SimpleError { err: "Failed to rename \"/home/monyarm/Downloads/Megaman Battle Network (U) [!].zip\" to \"/mnt/Games/Nintendo - Game Boy Advance/Mega Man Battle Network (USA).gba.zip\", could not rename `/home/monyarm/Downloads/Megaman Battle Network (U) [!].zip` to `/mnt/Games/Nintendo - Game Boy Advance/Mega Man Battle Network (USA).gba.zip`" }

Thinking that it might be because it's zipped, i then tried

oxyromon import-roms Mega\ Man\ Battle\ Network\ \(USA\).gba                
Processing "Mega Man Battle Network (USA).gba"
Matches "Mega Man Battle Network (USA).gba"
Moving to "/mnt/Games/Nintendo - Game Boy Advance/Mega Man Battle Network (USA).gba"
Error: SimpleError { err: "Failed to rename \"/home/monyarm/Downloads/Mega Man Battle Network (USA).gba\" to \"/mnt/Games/Nintendo - Game Boy Advance/Mega Man Battle Network (USA).gba\", could not rename `/home/monyarm/Downloads/Mega Man Battle Network (USA).gba` to `/mnt/Games/Nintendo - Game Boy Advance/Mega Man Battle Network (USA).gba`" }

The /mnt/Games/Nintendo - Game Boy Advance/ folder has been successfully created, but it refuses to move it over.

/ /mnt/Games and /home/ are each different partitions (/home is actually a bind mount to /mnt/HDD/home)

I'm running gentoo linux, and ran cargo build --release in order to build oxyromon

monyarm commented 2 years ago

Download the prebuild release has the same issue.

However, putting the file in /mnt/HDD, and then running oxyromon works. So the issue must be due to the different partitions. (They are all ext4, but /mnt/Games has the casefold feature)

alucryd commented 2 years ago

Thanks for reporting the issue. It's the different filesystems apparently: https://docs.rs/async-std/latest/async_std/fs/fn.rename.html

In such cases I'll have no choice but to copy the file and then delete the source. Will do it over the weekend, please stay tuned.

alucryd commented 2 years ago

Should be fixed in e95b000330eacfafd65d5da6204cd1c28ea2bab3.

@monyarm Are you able to build this commit? I have a lot going on in the develop branch so I'm not comfortable with releasing 0.11 yet, however I can cherry-pick that in the 0.10 branch and produce a 0.10.2 hotfix release if you'd like.

alucryd commented 2 years ago

Just released 0.11.0, please let me know if you have run into any other issue.