diff options
author | Tor Lillqvist <tml@novell.com> | 2005-09-15 11:24:32 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2005-09-15 11:24:32 +0000 |
commit | 849c506fd4051ff3fd02071fdd7a7b9993b9e27c (patch) | |
tree | 9c482b2a66ce02600da0876b798cf87c677b404b | |
parent | 390cf64c09684f7d9530b619dc4dabbd3db69038 (diff) | |
download | evolution-data-server-849c506fd4051ff3fd02071fdd7a7b9993b9e27c.tar.gz |
Use g_ascii_strncasecmp() instead of strncasecmp() for well-definedness.
2005-09-15 Tor Lillqvist <tml@novell.com>
* backends/file/e-book-backend-file.c
(e_book_backend_file_extract_path_from_uri): Use
g_ascii_strncasecmp() instead of strncasecmp() for
well-definedness. Use g_filename_from_uri() instead of just
stripping off a "file://" prefix. (On Win32, a file URI for a
pathname that includes a drive letter looks like
"file:///x:/dir/sub/file.ext", so stripping off "file://" leaves
an extra slash in front of the drive letter.)
-rw-r--r-- | addressbook/ChangeLog | 11 | ||||
-rw-r--r-- | addressbook/backends/file/e-book-backend-file.c | 4 |
2 files changed, 13 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 2a55229b1..dfca1598a 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,14 @@ +2005-09-15 Tor Lillqvist <tml@novell.com> + + * backends/file/e-book-backend-file.c + (e_book_backend_file_extract_path_from_uri): Use + g_ascii_strncasecmp() instead of strncasecmp() for + well-definedness. Use g_filename_from_uri() instead of just + stripping off a "file://" prefix. (On Win32, a file URI for a + pathname that includes a drive letter looks like + "file:///x:/dir/sub/file.ext", so stripping off "file://" leaves + an extra slash in front of the drive letter.) + 2005-08-22 Not Zed <NotZed@Ximian.com> * backends/groupwise/e-book-backend-groupwise.c diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c index 7ae755d7c..6e625fd97 100644 --- a/addressbook/backends/file/e-book-backend-file.c +++ b/addressbook/backends/file/e-book-backend-file.c @@ -850,9 +850,9 @@ e_book_backend_file_get_changes (EBookBackendSync *backend, static char * e_book_backend_file_extract_path_from_uri (const char *uri) { - g_assert (strncasecmp (uri, "file://", 7) == 0); + g_assert (g_ascii_strncasecmp (uri, "file://", 7) == 0); - return g_strdup (uri + 7); + return g_filename_from_uri (uri, NULL, NULL); } static EBookBackendSyncStatus |