Mercurial > audlegacy
changeset 78:ae0af0523844 trunk
[svn] Call gnome_vfs_escape_path_string() before attempting to open the file.
(Closes: #0000291)
author | msameer |
---|---|
date | Sun, 30 Oct 2005 15:25:52 -0800 |
parents | 0feb6db3a2da |
children | 38ddde5b0f13 |
files | libaudacious/vfs_gnome.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libaudacious/vfs_gnome.c Sun Oct 30 14:02:23 2005 -0800 +++ b/libaudacious/vfs_gnome.c Sun Oct 30 15:25:52 2005 -0800 @@ -51,10 +51,10 @@ file = g_new(VFSFile, 1); mode_to_gnome_vfs(mode, &g_mode, &truncate, &append); + gchar *escaped_file = gnome_vfs_escape_path_string(path); if (!truncate) { - g_result = gnome_vfs_open(&(file->handle), path, g_mode); - + g_result = gnome_vfs_open(&(file->handle), escaped_file, g_mode); if (append && g_result == GNOME_VFS_ERROR_NOT_FOUND) { g_result = gnome_vfs_create(&(file->handle), path, g_mode, TRUE, @@ -71,7 +71,7 @@ } else { g_result = gnome_vfs_create(&(file->handle), - path, g_mode, FALSE, + escaped_file, g_mode, FALSE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); } @@ -84,6 +84,8 @@ file = NULL; } + g_free(escaped_file); + return file; }