getattr on file opened for writing returns short length
Bug #195476 reported by
Forest Bond
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pytagsfs |
Fix Released
|
Critical
|
Forest Bond |
Bug Description
The bug does have the potential to cause corruption under certain circumstances.
When files are opened for writing, getattr calls by path continue to return the length of the file prior to being opened. This causes Python programs modifying those files to get a short length when they call fileobj.tell(). It seems like that call should use fgetattr, not getattr, which would make this a non-issue. However, I have seen corruption due to this problem when re-tagging ogg files with the pytags command (which relies on mutagen).
A work-around will be available shortly.
Changed in pytagsfs: | |
assignee: | nobody → forest-alittletooquiet |
importance: | Undecided → Critical |
status: | New → Fix Committed |
Changed in pytagsfs: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.