aboutsummaryrefslogtreecommitdiff
path: root/cryptfs
diff options
context:
space:
mode:
Diffstat (limited to 'cryptfs')
-rw-r--r--cryptfs/names_diriv.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/cryptfs/names_diriv.go b/cryptfs/names_diriv.go
index 46e2bfd..ab039f0 100644
--- a/cryptfs/names_diriv.go
+++ b/cryptfs/names_diriv.go
@@ -9,16 +9,16 @@ import (
// readDirIV - read the "gocryptfs.diriv" file from "dir" (absolute path)
func (be *CryptFS) readDirIV(dir string) (iv []byte, err error) {
- ivfile := filepath.Join(dir, DIRIV_FILENAME)
- iv, err = ioutil.ReadFile(ivfile)
- if err != nil {
- Warn.Printf("readDirIV: %v\n", err)
- return nil, err
- }
- if len(iv) != DIRIV_LEN {
- return nil, fmt.Errorf("readDirIV: Invalid length %d\n", len(iv))
- }
- return iv, nil
+ ivfile := filepath.Join(dir, DIRIV_FILENAME)
+ iv, err = ioutil.ReadFile(ivfile)
+ if err != nil {
+ Warn.Printf("readDirIV: %v\n", err)
+ return nil, err
+ }
+ if len(iv) != DIRIV_LEN {
+ return nil, fmt.Errorf("readDirIV: Invalid length %d\n", len(iv))
+ }
+ return iv, nil
}
// WriteDirIV - create diriv file inside "dir" (absolute path)