s3:util: let parent_dirname() correctly return toplevel filenames
authorStefan Metzmacher <metze@samba.org>
Tue, 30 Jun 2009 14:03:11 +0000 (16:03 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 3 Jul 2009 07:44:37 +0000 (09:44 +0200)
metze
(cherry picked from commit a14efbadd53ac9678d75e6029f947d63cfa0c4e5)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
This addresses bug #6526.

source3/lib/util.c

index 822b0cfb6a9850bb429979d8681f70f426a5a76e..61a73e60773071ea3b07dd07b504d6723d612b1c 100644 (file)
@@ -2336,7 +2336,7 @@ bool parent_dirname(TALLOC_CTX *mem_ctx, const char *dir, char **parent,
                        return False;
                }
                if (name) {
-                       *name = "";
+                       *name = dir;
                }
                return True;
        }