summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Lacage <mathieu@eazel.com>2000-08-04 19:14:10 +0000
committerMathieu Lacage <mathieu@src.gnome.org>2000-08-04 19:14:10 +0000
commitb4917b41d418603bb769b4d25dbdcc0a91109a77 (patch)
tree62291cda54e6544c45399e103449c10b3b20eb03
parent180ca3c029d345d77b556a1309f0e45fc202d139 (diff)
downloadnautilus-b4917b41d418603bb769b4d25dbdcc0a91109a77.tar.gz
fixes bug 1936. nautilus_get_uri_from_local_path has been made NULL proof.
2000-08-04 Mathieu Lacage <mathieu@eazel.com> * libnautilus-extensions/nautilus-file-utilities.c: (nautilus_get_uri_from_local_path): fixes bug 1936. nautilus_get_uri_from_local_path has been made NULL proof.
-rw-r--r--ChangeLog6
-rw-r--r--libnautilus-extensions/nautilus-file-utilities.c5
-rw-r--r--libnautilus-private/nautilus-file-utilities.c5
3 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fef695ac9..e8f8d1ce6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2000-08-04 Mathieu Lacage <mathieu@eazel.com>
+ * libnautilus-extensions/nautilus-file-utilities.c:
+ (nautilus_get_uri_from_local_path): fixes bug 1936.
+ nautilus_get_uri_from_local_path has been made NULL proof.
+
+2000-08-04 Mathieu Lacage <mathieu@eazel.com>
+
* src/nautilus-window.c: (nautilus_window_hide_sidebar),
(nautilus_window_show_sidebar): fixes bug 1881. add special
case tests.
diff --git a/libnautilus-extensions/nautilus-file-utilities.c b/libnautilus-extensions/nautilus-file-utilities.c
index 9bdbb6a16..6ddc4aefc 100644
--- a/libnautilus-extensions/nautilus-file-utilities.c
+++ b/libnautilus-extensions/nautilus-file-utilities.c
@@ -384,8 +384,11 @@ char *
nautilus_get_uri_from_local_path (const char *local_path)
{
char *escaped_path, *result;
+
+ if (local_path == NULL) {
+ return NULL;
+ }
- g_return_val_if_fail (local_path != NULL, NULL);
g_return_val_if_fail (local_path[0] == '/', NULL);
escaped_path = gnome_vfs_escape_path_string (local_path);
diff --git a/libnautilus-private/nautilus-file-utilities.c b/libnautilus-private/nautilus-file-utilities.c
index 9bdbb6a16..6ddc4aefc 100644
--- a/libnautilus-private/nautilus-file-utilities.c
+++ b/libnautilus-private/nautilus-file-utilities.c
@@ -384,8 +384,11 @@ char *
nautilus_get_uri_from_local_path (const char *local_path)
{
char *escaped_path, *result;
+
+ if (local_path == NULL) {
+ return NULL;
+ }
- g_return_val_if_fail (local_path != NULL, NULL);
g_return_val_if_fail (local_path[0] == '/', NULL);
escaped_path = gnome_vfs_escape_path_string (local_path);