From 7bc595785ee6ac59fe514fd84ddc6d3a3c44e587 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 16 Mar 2008 17:52:01 -0700 Subject: [PATCH] Made the FLAG_MOUNT_DIR bit only honored on a directory. --- generator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator.c b/generator.c index e189dddd..10500a99 100644 --- a/generator.c +++ b/generator.c @@ -279,7 +279,7 @@ static enum delret delete_dir_contents(char *fname, uint16 flags) for (j = dirlist->used; j--; ) { struct file_struct *fp = dirlist->files[j]; - if (fp->flags & FLAG_MOUNT_DIR) { + if (fp->flags & FLAG_MOUNT_DIR && S_ISDIR(fp->mode)) { if (verbose > 1) { rprintf(FINFO, "mount point, %s, pins parent directory\n", @@ -511,7 +511,7 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev) struct file_struct *fp = dirlist->files[i]; if (!F_IS_ACTIVE(fp)) continue; - if (fp->flags & FLAG_MOUNT_DIR) { + if (fp->flags & FLAG_MOUNT_DIR && S_ISDIR(fp->mode)) { if (verbose > 1) rprintf(FINFO, "cannot delete mount point: %s\n", f_name(fp, NULL)); -- 2.34.1