fmang / opustags

Ogg Opus tags editor
BSD 3-Clause "New" or "Revised" License
81 stars 11 forks source link

Open fd to source file prevents inplace rename on SMB #62

Closed eduarrrd closed 1 year ago

eduarrrd commented 1 year ago

When using --in-place rename, https://github.com/fmang/opustags/blob/49bb94841ef6e468ba6dfcade5321c6b814edb3f/src/system.cc#L87 it fails on SMB mounts because final_name resolves to the input file which is not yet closed. The syscall returns an EACCES instead. I confirmed this in strace as well.

I'm not quite sure how much of this is WAI on the FS side but this is 100% reproducible on my end. Closing the source file before the rename solves this issue.

fmang commented 1 year ago

Thank you for the report! I’ve opened #63. Could you please confirm that it does solve your issue?