aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/rfile.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-05-28 18:09:02 +0200
committerJakob Unterwurzacher2017-05-30 17:04:46 +0200
commit857507e8b100626ae0471fae793efc52bf552821 (patch)
tree155ff21467d8b35887e9a7fd984d37e23f7e6e70 /internal/fusefrontend_reverse/rfile.go
parent4d2cc551cf6fa71e425fad8f397e96d69f016a6b (diff)
fusefrontend_reverse: move pathiv to its own package
We will also need it in forward mode.
Diffstat (limited to 'internal/fusefrontend_reverse/rfile.go')
-rw-r--r--internal/fusefrontend_reverse/rfile.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/fusefrontend_reverse/rfile.go b/internal/fusefrontend_reverse/rfile.go
index 9a680bb..b19ad5e 100644
--- a/internal/fusefrontend_reverse/rfile.go
+++ b/internal/fusefrontend_reverse/rfile.go
@@ -14,6 +14,7 @@ import (
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/rfjakob/gocryptfs/internal/contentenc"
+ "github.com/rfjakob/gocryptfs/internal/pathiv"
"github.com/rfjakob/gocryptfs/internal/tlog"
)
@@ -60,8 +61,8 @@ func (rfs *ReverseFS) newFile(relPath string, flags uint32) (nodefs.File, fuse.S
tlog.Debug.Printf("ino%d: newFile: found in the inode table", st.Ino)
derivedIVs = v.(derivedIVContainer)
} else {
- derivedIVs.id = derivePathIV(relPath, ivPurposeFileID)
- derivedIVs.block0IV = derivePathIV(relPath, ivPurposeBlock0IV)
+ derivedIVs.id = pathiv.Derive(relPath, pathiv.PurposeFileID)
+ derivedIVs.block0IV = pathiv.Derive(relPath, pathiv.PurposeBlock0IV)
// Nlink > 1 means there is more than one path to this file.
// Store the derived values so we always return the same data,
// regardless of the path that is used to access the file.