Hello,

Handle paths without trailing / in fs_dirs_create().

This patch should go to all branches with fs_dirs_create() function.

--
Petr^2 Spacek
From f56f50b24bb3203f28b6896e413f58fb756a32c2 Mon Sep 17 00:00:00 2001
From: Petr Spacek <pspa...@redhat.com>
Date: Wed, 16 Apr 2014 14:58:35 +0200
Subject: [PATCH] Handle paths without trailing / in fs_dirs_create().

Signed-off-by: Petr Spacek <pspa...@redhat.com>
---
 src/fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/fs.c b/src/fs.c
index 861865d48688b649e68552177f3e56b98d5b59f9..255026a23e1703048073e2b584ac5602bc05f85d 100644
--- a/src/fs.c
+++ b/src/fs.c
@@ -92,7 +92,8 @@ fs_dirs_create(const char *path) {
 			CHECK(fs_dir_create(curr_path));
 		*end = '/';
 	}
-
+	/* Handle single-component paths and paths without trailing '/' */
+	CHECK(fs_dir_create(curr_path));
 
 cleanup:
 	return result;
-- 
1.9.0

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to