[ostree] rofiles-fuse: Handle operations on the root
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] rofiles-fuse: Handle operations on the root
- Date: Wed, 24 Feb 2016 19:43:40 +0000 (UTC)
commit 6c285d2e4ac76e99df848e2dea3cb0633126728a
Author: Alexander Larsson <alexl redhat com>
Date: Wed Feb 24 12:14:38 2016 +0100
rofiles-fuse: Handle operations on the root
ENSURE_RELPATH breaks when path is "/". In that case we need
to return "." instead of "".
https://bugzilla.gnome.org/show_bug.cgi?id=762596
src/rofiles-fuse/main.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/rofiles-fuse/main.c b/src/rofiles-fuse/main.c
index 4337f00..3c910f1 100644
--- a/src/rofiles-fuse/main.c
+++ b/src/rofiles-fuse/main.c
@@ -46,7 +46,10 @@ static GHashTable *created_devino_hash = NULL;
static inline const char *
ENSURE_RELPATH (const char *path)
{
- return path + strspn (path, "/");
+ path = path + strspn (path, "/");
+ if (*path == 0)
+ return ".";
+ return path;
}
typedef struct {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]