[gvfs] archive: Ignore filenames consisting of a single "."
- From: Ross Lagerwall <rossl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] archive: Ignore filenames consisting of a single "."
- Date: Sat, 10 May 2014 07:30:43 +0000 (UTC)
commit 46bdbf1d45962b56f4c30763fbc964890b75d79a
Author: Ross Lagerwall <rosslagerwall gmail com>
Date: Sat May 3 18:38:08 2014 +0100
archive: Ignore filenames consisting of a single "."
Don't abort if a path has a component consisting of a single ".",
just ignore that component.
E.g. OpenCV-2.3.1/./opencv.pc.cmake.in becomes
OpenCV-2.3.1/opencv.pc.cmake.in
https://bugzilla.gnome.org/show_bug.cgi?id=729463
daemon/gvfsbackendarchive.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gvfsbackendarchive.c b/daemon/gvfsbackendarchive.c
index b69db2c..0377c70 100644
--- a/daemon/gvfsbackendarchive.c
+++ b/daemon/gvfsbackendarchive.c
@@ -297,9 +297,8 @@ archive_file_get_from_path (ArchiveFile *file, const char *filename, gboolean ad
}
else
{
- /* happens when adding directories, their path ends with a / */
- /* Can also happen with "." in e.g. iso files */
- g_assert (names[i + 1] == NULL);
+ /* Ignore empty elements from directories ending with a slash.
+ * Ignore elements consisting of a single "." */
g_free (names[i]);
names[i] = NULL;
cur = file;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]