Skip to content

Commit

Permalink
NDMP: fix missing slash on solaris NDMP between filesystem and path
Browse files Browse the repository at this point in the history
When backing up the Filesystem /export/home on solaris, and
there is a directory regress, we got before:

 /export/homeregress/

and now we get:

 /export/home/regress/
  • Loading branch information
pstorz committed Mar 2, 2017
1 parent f733669 commit 01e8411
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/dird/ndmp_fhdb_common.c
Expand Up @@ -66,6 +66,13 @@ extern "C" int bndmp_fhdb_add_file(struct ndmlog *ixlog, int tagc, char *raw_nam

pm_strcpy(pathname, nis->filesystem);

/*
* make sure we have a trailing slash
*/
if ( pathname.c_str()[strlen(pathname.c_str()) - 1] != '/' ) {
pm_strcat(pathname, "/");
}

/*
* skip leading slash to avoid double slashes
*/
Expand Down

0 comments on commit 01e8411

Please sign in to comment.