search fstab for mount points with trailing slash too.

This commit is contained in:
wbaumann 2010-05-04 20:19:22 +00:00
parent b720dc467c
commit 78f56f4b3c
2 changed files with 11 additions and 0 deletions

View File

@ -1,6 +1,11 @@
ChangeLog for davfs2 ChangeLog for davfs2
-------------------- --------------------


2010-05-04 Werner Baumann (werner.baumann@onlinehome.de)
* mount_davfs.c, check_fstab:
Search fstab additionally for mount point with
trailing slash (Debian Bug#580227).

2010-04-30 Werner Baumann (werner.baumann@onlinehome.de) 2010-04-30 Werner Baumann (werner.baumann@onlinehome.de)
* Released version 1.4.6 * Released version 1.4.6



View File

@ -682,6 +682,12 @@ check_fstab(const dav_args *args)


setfsent(); setfsent();
struct fstab *ft = getfsfile(mpoint); struct fstab *ft = getfsfile(mpoint);
if (!ft) {
char *mp = NULL;
if (asprintf(&mp, "%s/", mpoint) < 0) abort();
ft = getfsfile(mp);
if (mp) free(mp);
}
if (!ft || !ft->fs_spec) if (!ft || !ft->fs_spec)
error(EXIT_FAILURE, 0, _("no entry for %s found in %s"), url, error(EXIT_FAILURE, 0, _("no entry for %s found in %s"), url,
_PATH_FSTAB); _PATH_FSTAB);