Commit 479b32f5 authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

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.
parent 34854513
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment