[Xfce4-commits] r24320 - squeeze/trunk/libsqueeze
Stephan Arts
stephan at xfce.org
Mon Jan 8 20:52:42 CET 2007
Author: stephan
Date: 2007-01-08 19:52:42 +0000 (Mon, 08 Jan 2007)
New Revision: 24320
Modified:
squeeze/trunk/libsqueeze/internals.c
squeeze/trunk/libsqueeze/libsqueeze.c
Log:
fixed opening of multiple archives using relative paths
Modified: squeeze/trunk/libsqueeze/internals.c
===================================================================
--- squeeze/trunk/libsqueeze/internals.c 2007-01-08 19:31:46 UTC (rev 24319)
+++ squeeze/trunk/libsqueeze/internals.c 2007-01-08 19:52:42 UTC (rev 24320)
@@ -170,15 +170,22 @@
static gint
lsq_opened_archives_lookup_archive(gconstpointer open_archive, gconstpointer path)
{
- ThunarVfsPath *path_info = thunar_vfs_path_new(path, NULL);
+ ThunarVfsPath *path_info = NULL;
+ if(g_path_is_absolute(path))
+ path_info = thunar_vfs_path_new(path, NULL);
+ else
+ path_info = thunar_vfs_path_relative(lsq_relative_base_path, path);
+
if(thunar_vfs_path_equal(((LSQArchive *)open_archive)->path_info, path_info))
{
- thunar_vfs_path_unref(path_info);
+ if(path_info)
+ thunar_vfs_path_unref(path_info);
return 0;
}
else
{
- thunar_vfs_path_unref(path_info);
+ if(path_info)
+ thunar_vfs_path_unref(path_info);
return 1;
}
}
Modified: squeeze/trunk/libsqueeze/libsqueeze.c
===================================================================
--- squeeze/trunk/libsqueeze/libsqueeze.c 2007-01-08 19:31:46 UTC (rev 24319)
+++ squeeze/trunk/libsqueeze/libsqueeze.c 2007-01-08 19:52:42 UTC (rev 24320)
@@ -46,6 +46,7 @@
*/
lsq_relative_base_path = thunar_vfs_path_new(current_dir, NULL);
+ lsq_opened_archive_list = NULL;
g_free(current_dir);
}
More information about the Xfce4-commits
mailing list