GNOME Bugzilla – Bug 549298
impossible to copy files with p (pipe) flag
Last modified: 2009-04-02 08:39:13 UTC
Please describe the problem: In Hardy updated when I try to copy type p (pipe) files to another directory, the copy window get stuck not copying anything and I can't close it, even from gvfs copy applet. I can only kill it, and this restart nautilus. As a real example, there are 2 files in my .gcjwebplugin folder in my home, gcj-instance-6501-1-appletviewer-to-plugin and gcj-instance-6501-1-plugin-to-appletviewer (type p files), trying to copy them (moving them works instead) to another directory expose the bug. Steps to reproduce: 1. Get a type p (pipe) file (gcj-instance-6501-1-appletviewer-to-plugin and gcj-instance-6501-1-plugin-to-appletviewer found in .gcjwebplugin folder for example) 2. Try to copy it/them to another folder or to an external usb disk for example. Actual results: the copy window get stuck not copying anything and you can't close it, even from gvfs copy applet. You can only kill it using the kill applet for example , but this restart nautilus. Expected results: Does this happen every time? Yes. Other information: This is a critical problem because it prevents home folder to being copied as a whole (to backup it for example) to an external usb disk. It starts to copy files, and then, at a certain point, copy window get stuck, and you can't understand why.
This bug was originally opened on https://bugs.launchpad.net/gvfs/+bug/259505
This likely happens because gio opens the (pipe) file and when reading from it we never get anything (or reach EOF for that matter). When copying local files, which seems to be the case you are describing, gvfs isn't involved AFAIK so it's a glib/gio bug (but similar bugs could exist in each gvfs backend ofcourse). Another way to reproduce: mkfifo testpipe gvfs-copy testpipe foobar ^c rm testpipe On a related note, when copying a device node file the contents is copied which is probably never what anyone wants... I think we should just fail to copy all special files for now, until someone figures out what copy should mean for each type.
Created attachment 129006 [details] [review] Fail to copy special files.
Oh, the error message should probably be marked for translation....
Created attachment 129062 [details] [review] fail/skip copying special files (rev 2) Updated patch according to alex_ comments. Readjust to only query a single time. Querying the symlink target for all files (even non-symlinks) is no real overhead.
Created attachment 129070 [details] [review] fail/skip copying special files (rev 3) Slight adjustment according to alex_ comments.
commited.
Changing the package affected, according to bug report.
*** Bug 572828 has been marked as a duplicate of this bug. ***
Did you also fix the issue in http://bugzilla.gnome.org/show_bug.cgi?id=533917 ? There was a problem with looking at the "Properties" of a pipe file and I guess it is the same issue as this bug here. Bug #533917 should be fixed in a similar way, I guess.
*** Bug 533917 has been marked as a duplicate of this bug. ***