aboutsummaryrefslogtreecommitdiff
path: root/pathfs_frontend/fs.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-11-01 12:11:36 +0100
committerJakob Unterwurzacher2015-11-01 12:11:36 +0100
commit902babdf22199d73171716e643f1ffbb65e6fb48 (patch)
treec3194bce9fd9b4db0a569fca3b5041abd278be70 /pathfs_frontend/fs.go
parent14276c96328a1a1ad2b354c65d8db7fa720559e1 (diff)
Refactor ciphertext <-> plaintext offset translation functions
Move all the intelligence into the new file address_translation.go. That the calculations were spread out too much became apparent when adding the file header. This should make the code much easier to modify in the future.
Diffstat (limited to 'pathfs_frontend/fs.go')
-rw-r--r--pathfs_frontend/fs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pathfs_frontend/fs.go b/pathfs_frontend/fs.go
index eebc87b..3ec503f 100644
--- a/pathfs_frontend/fs.go
+++ b/pathfs_frontend/fs.go
@@ -41,7 +41,7 @@ func (fs *FS) GetAttr(name string, context *fuse.Context) (*fuse.Attr, fuse.Stat
return a, status
}
if a.IsRegular() {
- a.Size = fs.PlainSize(a.Size)
+ a.Size = fs.CipherSizeToPlainSize(a.Size)
} else if a.IsSymlink() {
target, _ := fs.Readlink(name, context)
a.Size = uint64(len(target))