aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/rfile.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fusefrontend_reverse/rfile.go')
-rw-r--r--internal/fusefrontend_reverse/rfile.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/internal/fusefrontend_reverse/rfile.go b/internal/fusefrontend_reverse/rfile.go
index 75932cb..9c31681 100644
--- a/internal/fusefrontend_reverse/rfile.go
+++ b/internal/fusefrontend_reverse/rfile.go
@@ -34,19 +34,16 @@ type reverseFile struct {
var inodeTable syncmap.Map
-// newFile decrypts and opens the path "relPath" and returns a reverseFile
+// newFile receives a ciphered path "relPath" and its corresponding
+// decrypted path "pRelPath", opens it and returns a reverseFile
// object. The backing file descriptor is always read-only.
-func (rfs *ReverseFS) newFile(relPath string) (*reverseFile, fuse.Status) {
- if rfs.isExcluded(relPath) {
+func (rfs *ReverseFS) newFile(relPath string, pRelPath string) (*reverseFile, fuse.Status) {
+ if rfs.isExcludedPlain(pRelPath) {
// Excluded paths should have been filtered out beforehand. Better safe
// than sorry.
tlog.Warn.Printf("BUG: newFile: received excluded path %q. This should not happen.", relPath)
return nil, fuse.ENOENT
}
- pRelPath, err := rfs.decryptPath(relPath)
- if err != nil {
- return nil, fuse.ToStatus(err)
- }
dir := filepath.Dir(pRelPath)
dirfd, err := syscallcompat.OpenDirNofollow(rfs.args.Cipherdir, dir)
if err != nil {