diff options
author | Jakob Unterwurzacher | 2020-07-19 23:03:47 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2020-07-19 23:03:47 +0200 |
commit | 8915785acf7e6e7908b32103406620f243093931 (patch) | |
tree | 94b7e6f1636f4d3355f8c13723125fc40a45f562 /mount.go | |
parent | 49fc3abcb4867ea4ce2426340dbe583ef6de055a (diff) |
v2api: fsck: use a temporary mount
Directly accessing the Nodes does not work properly,
as there is no way to attach a newly LOOKUPped Node
to the tree. This means Path() does not work.
Use an actual mount instead and walk the tree.
Diffstat (limited to 'mount.go')
-rw-r--r-- | mount.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -221,7 +221,7 @@ func setOpenFileLimit() { } } -// initFuseFrontend - initialize gocryptfs/fusefrontend +// initFuseFrontend - initialize gocryptfs/internal/fusefrontend // Calls os.Exit on errors func initFuseFrontend(args *argContainer) (rootNode fs.InodeEmbedder, wipeKeys func()) { var err error @@ -326,6 +326,9 @@ func initFuseFrontend(args *argContainer) (rootNode fs.InodeEmbedder, wipeKeys f return rootNode, func() { cCore.Wipe() } } +// initGoFuse calls into go-fuse to mount `rootNode` on `args.mountpoint`. +// The mountpoint is ready to use when the functions returns. +// On error, it calls os.Exit and does not return. func initGoFuse(rootNode fs.InodeEmbedder, args *argContainer) *fuse.Server { var fuseOpts *fs.Options sec := time.Second |