Add option to use root as owner of files/dirs

This commit is contained in:
Alexander Neumann committed 2015-07-26 20:56:27 +02:00
1 parent bdcb2175c5
commit dde0fd8421
6 files changed
+59 -36

No files matched your search

+3 -1
View File
@@ -13,6 +13,8 @@ import (
)
type CmdMount struct {
Root bool `long:"owner-root" description:"use 'root' as the owner of files and dirs" default:"false"`
global *GlobalOptions
ready chan struct{}
done chan struct{}
@@ -69,7 +71,7 @@ func (cmd CmdMount) Execute(args []string) error {
}
root := fs.Tree{}
root.Add("snapshots", fuse.NewSnapshotsDir(repo))
root.Add("snapshots", fuse.NewSnapshotsDir(repo, cmd.Root))
cmd.global.Printf("Now serving %s at %s\n", repo.Backend().Location(), mountpoint)
cmd.global.Printf("Don't forget to umount after quitting!\n")