mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-25 02:36:07 +00:00
Check for NULL path before calling
2006-10-19 Christian Neumair <chris@gnome-de.org> * libnautilus-private/nautilus-file.c: (nautilus_file_get_volume_name): Check for NULL path before calling gnome_vfs_volume_monitor_get_volume_for_path(). * libnautilus-private/nautilus-monitor.c: (path_is_on_readonly_volume): Assert path.
This commit is contained in:
parent
34854513aa
commit
479b32f554
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2006-10-19 Christian Neumair <chris@gnome-de.org>
|
||||
|
||||
* libnautilus-private/nautilus-file.c:
|
||||
(nautilus_file_get_volume_name):
|
||||
Check for NULL path before calling
|
||||
gnome_vfs_volume_monitor_get_volume_for_path().
|
||||
|
||||
* libnautilus-private/nautilus-monitor.c:
|
||||
(path_is_on_readonly_volume):
|
||||
Assert path.
|
||||
|
||||
2006-10-19 Christian Neumair <chris@gnome-de.org>
|
||||
|
||||
* src/file-manager/fm-directory-view.c:
|
||||
|
|
|
@ -5115,9 +5115,13 @@ nautilus_file_get_volume_name (NautilusFile *file)
|
|||
char *volume_name;
|
||||
GnomeVFSVolume *volume;
|
||||
file_uri = nautilus_file_get_uri (file);
|
||||
|
||||
|
||||
volume = NULL;
|
||||
|
||||
local_path = gnome_vfs_get_local_path_from_uri (file_uri);
|
||||
volume = gnome_vfs_volume_monitor_get_volume_for_path (gnome_vfs_get_volume_monitor (), local_path);
|
||||
if (local_path != NULL) {
|
||||
volume = gnome_vfs_volume_monitor_get_volume_for_path (gnome_vfs_get_volume_monitor (), local_path);
|
||||
}
|
||||
|
||||
g_free (file_uri);
|
||||
g_free (local_path);
|
||||
|
|
|
@ -73,6 +73,8 @@ path_is_on_readonly_volume (const char *path)
|
|||
GnomeVFSVolume *volume;
|
||||
gboolean res;
|
||||
|
||||
g_assert (path != NULL);
|
||||
|
||||
volume_monitor = gnome_vfs_get_volume_monitor ();
|
||||
volume = gnome_vfs_volume_monitor_get_volume_for_path (volume_monitor,
|
||||
path);
|
||||
|
|
Loading…
Reference in a new issue