afscp: allow listing of bare root.cell dirs in dynroot mode
authorDerrick Brashear <shadow@dementix.org>
Wed, 21 Sep 2011 06:03:30 +0000 (02:03 -0400)
committerDerrick Brashear <shadow@dementix.org>
Wed, 21 Sep 2011 13:16:55 +0000 (06:16 -0700)
don't assume that /afs/cell.name (as opposed to /afs/cell.name/)
is bogus. if there's text, at least try

Change-Id: I9566efe60c942533cd0415a03528953cb90310c9
Reviewed-on: http://gerrit.openafs.org/5480
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

src/libafscp/afscp_dir.c

index 84af127..780c6d9 100644 (file)
@@ -371,7 +371,7 @@ gettoproot(struct afscp_cell *cell, char *p, char **q,
            r = p;
            while (*r && *r != '/')
                r++;
-           if (!*r) {
+           if (!*r && !p) {
                afscp_errno = ENODEV;
                return 1;
            }