Summary: | Collection scanner opens files O_RDWR | ||
---|---|---|---|
Product: | [Frameworks and Libraries] taglib | Reporter: | Manuel Amador (Rudd-O) <rudd-o> |
Component: | general | Assignee: | Scott Wheeler <wheeler> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | lalinsky, mitchell, ralf-engels |
Priority: | NOR | ||
Version: | 1.6.3 | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Manuel Amador (Rudd-O)
2011-03-24 11:35:24 UTC
After checking the code I found that taglib is opening the files like this: // First try with read / write mode, if that fails, fall back to read only. taglib/toolkit/tfile.cpp:90 Taglib needs to do it like this because it can't know if the caller would later on try to modify tags. Also it doesn't know if the track is just afterwards used for playback. Can you report this issue against taglib? It would be easy to tell taglib beforehand that we only want to read the file and not re-use it afterwards. Why can't TagLib know when to reopen the file? To the extent that I know, as soon as one of the methods that actually modifies the file is called, that's how TagLib knows that it needs write access to the file. If it needs to do a permissions check *beforehand* to know if the file is modifiable, then TagLib can use access() for that. Already amarok does a metric ton of access()es already... I will upstream this. Of course TagLib could reopen the file once it needs to actually write it. However it's currently not doing this. reassigning And now it's a duplicate :) *** This bug has been marked as a duplicate of bug 269395 *** |