diff options
author | Gene Z. Ragan <gzr@eazel.com> | 2001-01-29 21:48:48 +0000 |
---|---|---|
committer | Gene Ragan <gzr@src.gnome.org> | 2001-01-29 21:48:48 +0000 |
commit | 9544a225df9e17443e351d1cae8a5a2ffb0269e4 (patch) | |
tree | 56e68463aa629d4f9d6011a05be6af981379102a /libnautilus-extensions/nautilus-volume-monitor.c | |
parent | 5e384e1bd1e407a837ce32bd047ad83273115f9b (diff) | |
download | nautilus-9544a225df9e17443e351d1cae8a5a2ffb0269e4.tar.gz |
reviewed by: Pavel Cisler <pavel@eazel.com>
2001-01-29 Gene Z. Ragan <gzr@eazel.com>
reviewed by: Pavel Cisler <pavel@eazel.com>
Fixed bug 6098, mounting and unmounting a cdrom
volume incorrectly reports error.
* libnautilus-extensions/nautilus-volume-monitor.c:
(close_error_pipe):
Loop on read until we get an error or end of read.
* src/file-manager/fm-desktop-icon-view.c:
(create_unique_volume_name):
Tweak the index so the created name accurately reflects
the number of occurence the file is.
Initial work on adding a GMC to Nautilus transition mechanism
to the first time wizard.
* src/nautilus-first-time-druid.c: (druid_finished),
(convert_gmc_desktop_icons), (transition_value_changed),
(set_up_gmc_transition_page), (nautilus_first_time_druid_show):
Diffstat (limited to 'libnautilus-extensions/nautilus-volume-monitor.c')
-rw-r--r-- | libnautilus-extensions/nautilus-volume-monitor.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libnautilus-extensions/nautilus-volume-monitor.c b/libnautilus-extensions/nautilus-volume-monitor.c index 43903fb46..31dd54d5e 100644 --- a/libnautilus-extensions/nautilus-volume-monitor.c +++ b/libnautilus-extensions/nautilus-volume-monitor.c @@ -1273,7 +1273,7 @@ close_error_pipe (gboolean mount, const char *mount_path) char *message; const char *title; char detailed_msg[MAX_PIPE_SIZE]; - int len = 0; + int length = 0; gboolean is_floppy; MountStatusInfo *info; @@ -1287,17 +1287,20 @@ close_error_pipe (gboolean mount, const char *mount_path) close (2); dup (old_error); close (old_error); - len = read (error_pipe[0], detailed_msg, MAX_PIPE_SIZE); - - if (len >= 0) { - detailed_msg[len] = 0; + + do { + length = read (error_pipe[0], detailed_msg, MAX_PIPE_SIZE); + } while (length < 0); + + if (length >= 0) { + detailed_msg[length] = 0; } close (error_pipe[0]); } /* No output to show */ - if (len == 0) { + if (length == 0) { return; } @@ -1310,7 +1313,8 @@ close_error_pipe (gboolean mount, const char *mount_path) if (strstr (detailed_msg, _("is write-protected, mounting read-only")) != NULL) { /* This is not an error. Just an informative message from mount. */ return; - } else if (strstr (detailed_msg, _("is not a valid block device")) != NULL) { + } else if ((strstr (detailed_msg, _("is not a valid block device")) != NULL) || + (strstr (detailed_msg, _("No medium found")) != NULL)) { /* No media in drive */ if (is_floppy) { /* Handle floppy case */ |