Re: Updating OGG tags on Windows



Hi Nicholas

On 2016-11-03 13:31, Nicholas Sheppard <nps nps id au> wrote:
I've been using EasyTAG 2.4.2 on Windows. I've found that trying to save
the changes to the tags of an OGG file results in an error dialogue
headed "Cannot write tag in file 'xxxxxx.ogg'", with the explanation
"Error renaming temporary file: Permission denied".

The problem seems to be that the call to g_replace_file_contents() in
vcedit_write() fails because the input stream used to read the file is
still open, and Windows does not allow files to be renamed if some
process has an open file handle for them. (The call is on line 1050 of
tags/vcedit.c).

I tried adding g_input_stream_close(G_INPUT_STREAM(state->in), NULL,
error) immediately before the call to g_replace_file_contents() and
re-compiling. Sure enough, EasyTAG was then able to update the file
successfully. But this seems like a bit of a hack, and I don't know what
sort of side effects it might have as I haven't done much testing. Are
there any other work-arounds for this problem?

Thanks for the bug report and testing! I pushed a couple of commits that should fix this:

https://git.gnome.org/browse/easytag/commit/?id=2576fbaf7edbfdb60d25692c7c3407f36751fe68
https://git.gnome.org/browse/easytag/commit/?id=e5c640ca3f259f1b74e716723345521987a7bd68

The first commit is roughly equivalent to your hack, and was pretty quick to implement. The second commit is a refinement, that only keeps the file open for reading as long as required, and closes it between vcedit_*() function calls. I have given it some testing under Linux, where it seems to work fine (as before), but some thorough testing under Windows would be appreciated.

--
http://amigadave.com/

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]