diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -236,7 +236,11 @@ func main() { tlog.Fatal.Printf("Invalid mountpoint: %v", err) os.Exit(ErrExitMountPoint) } - err = checkDirEmpty(args.mountpoint) + if args.nonempty { + err = checkDir(args.mountpoint) + } else { + err = checkDirEmpty(args.mountpoint) + } if err != nil { tlog.Fatal.Printf("Invalid mountpoint: %v", err) os.Exit(ErrExitMountPoint) @@ -348,6 +352,9 @@ func initFuseFrontend(key []byte, args argContainer, confFile *configfile.ConfFi // Make the kernel check the file permissions for us mOpts.Options = append(mOpts.Options, "default_permissions") } + if args.nonempty { + mOpts.Options = append(mOpts.Options, "nonempty") + } // Set values shown in "df -T" and friends // First column, "Filesystem" mOpts.Options = append(mOpts.Options, "fsname="+args.cipherdir) |