After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 657531 - Attempt to save and replace a .png file results in error fstat()
Attempt to save and replace a .png file results in error fstat()
Status: RESOLVED FIXED
Product: gnome-screenshot
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-screenshot-maint
gnome-screenshot-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-27 22:50 UTC by sam_
Modified: 2012-01-26 21:38 UTC
See Also:
GNOME target: ---
GNOME version: 3.1/3.2


Attachments
error-dialog (52.32 KB, image/png)
2011-08-27 22:50 UTC, sam_
Details
gdb-output (2.22 KB, text/plain)
2011-08-27 22:51 UTC, sam_
Details

Description sam_ 2011-08-27 22:50:42 UTC
Created attachment 194942 [details]
error-dialog

Reproducable.
Make a screenshot of an empty gedit window via shortcut alt+print.
Save the file to e.g. folder 'Images', name the file e.g. test-1.
Make another screenshot, save the file to the same directory with the same file name.
The attempt to replace the file results in a dialog (translated from german):
Error during investigation of file /tmp/gnome-screenshot.<insert_number>/screenshot.png with fstat(): File or directory not found.

So actually it doesn't state the correct file name test-1, although it mentions it in the replacement dialog.

## There is no problem to save and replace text files with same title.

First reported there.
https://bugs.launchpad.net/ubuntu/+source/gnome-utils/+bug/835712
Comment 1 sam_ 2011-08-27 22:51:44 UTC
Created attachment 194943 [details]
gdb-output
Comment 2 Jean-François Fortin Tam 2011-11-10 16:38:06 UTC
I'm seeing the same problem on GNOME 3.2, where

I get an error (somehow I can't get it to print it in English):

Erreur de l'interrogation du fichier « /tmp/gnome-screenshot.20286.0/Screenshot.png » : Aucun fichier ou dossier de ce type
Comment 3 Sebastien Bacher 2011-12-14 13:40:52 UTC
the current unstable version seems to not ask whether to replace the file or not but just error out...
Comment 4 sep16 2011-12-14 18:27:23 UTC
I'm experiencing this on Gnome 3.2.

Launching gnome-screenshot from the command line (in the foreground), on the second time around when saving the screen shot using the same name as an existing screenshot, gnome-screenshot exits and a "file conflict" dialog appears.  Clicking "replace" gives an error dialog "Error while copying 'Screenshot.png'".

Observing "ps ux" I see that gnome-screenshot is no longer running when the "replace" dialog is up but "nautilus --no-default-window" is.  Is it possible that gnome-screenshot hands off file replacement to nautilus but deletes the temporary screenshot before exiting?
Comment 5 Cosimo Cecchi 2012-01-26 21:38:52 UTC
Yes, gnome-screenshot used nautilus in the past to perform this kind of operation.

This bug has been fixed in git master, thanks for the report.