[beast: 3/8] SFI: fix filecrawler reporting root dir as empty string
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 3/8] SFI: fix filecrawler reporting root dir as empty string
- Date: Wed, 23 Sep 2015 09:06:25 +0000 (UTC)
commit 35bc99c61ead077202f8d3c9d71ddab3be408f48
Author: Tim Janik <timj gnu org>
Date: Thu Sep 17 17:30:53 2015 +0200
SFI: fix filecrawler reporting root dir as empty string
sfi/sfifilecrawler.cc | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/sfi/sfifilecrawler.cc b/sfi/sfifilecrawler.cc
index 1950746..cb91a55 100644
--- a/sfi/sfifilecrawler.cc
+++ b/sfi/sfifilecrawler.cc
@@ -237,8 +237,11 @@ file_crawler_queue_abs_file_path (SfiFileCrawler *self,
}
g_free (tmp);
- /* add root to dir list ("" on unix) */
- self->dlist = sfi_ring_prepend (self->dlist, g_strdup (p));
+ // add root to dir list
+ if (sep[0] == 0) // path_pattern == root, i.e. we're done
+ self->dlist = sfi_ring_prepend (self->dlist, g_strdup (path_pattern));
+ else // on unix, this root segment is ""
+ self->dlist = sfi_ring_prepend (self->dlist, g_strdup (p));
/* compress multiple dir seperators */
while (*sep == G_DIR_SEPARATOR)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]