PNG export writes directly to output filepath
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I'm using this Inkscape version:
Inkscape 0.91+devel+osxmenu r12922, built Jun 16 2015, 09:24:00
However, I've looked at the source and confirmed it's on the latest 0.92.x branch.
Here is where the export process opens the filename:
https:/
It finishes up writing here:
https:/
This makes it impossible to use programs that e.g. watch for file modifications and refresh the image elsewhere when working with Inkscape. I'm making sprites in Inkscape for game dev, and I wrote a simple routine to refresh sprites when updated by Inkscape. But it always fails with "invalid PNG" because the file has not finished being written.
If instead, it did the usual "write to temp and then move" approach, then this would be possible:
1. Create a temporary file, write to that with the PNG writer.
2. Run an atomic rename()/mv on the temp file to the target filename.
Then external tools will see an atomic update.
If no one is opposed, I could contribute a patch for this.
tags: | added: bug-migration |
Changed in inkscape: | |
status: | New → Invalid |
Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new bug tracker on GitLab, and closed it here.
Note that inkscape development is currently focused on Inkscape 1.0alpha, though I imagine the relevant code will be similar/the same. If you're still interested in writing a patch, look forward to seeing you around :)
Disclaimer: I don't know if anyone is opposed
Please feel free to file new bugs about the issues you're seeing at inkscape. org/report.
http://
Moved to: https:/ /gitlab. com/inkscape/ inbox/issues/ 463 /gitlab. com/nathanal
Closed by: https:/