This commit is contained in:
Jakob Unterwurzacher 2015-12-08 13:51:06 +01:00
parent f4ae0304af
commit ff8c81f95b
2 changed files with 4 additions and 5 deletions

View File

@ -325,14 +325,13 @@ func TestMkdirRmdir(t *testing.T) {
}
}
// Test Rename
func TestRename(t *testing.T) {
err := ioutil.WriteFile(defaultPlainDir + "rename1", []byte("content"), 0777)
err := ioutil.WriteFile(defaultPlainDir+"rename1", []byte("content"), 0777)
if err != nil {
t.Fatal(err)
}
err = syscall.Rename(defaultPlainDir + "rename1", defaultPlainDir + "rename2")
err = syscall.Rename(defaultPlainDir+"rename1", defaultPlainDir+"rename2")
if err != nil {
t.Fatal(err)
}

View File

@ -99,8 +99,8 @@ func (f *file) createHeader() error {
defer f.fdLock.Unlock()
err := syscall.Fallocate(int(f.fd.Fd()), FALLOC_FL_KEEP_SIZE, 0, cryptfs.HEADER_LEN)
if err != nil {
cryptfs.Warn.Printf("createHeader: Fallocate failed: %s\n", err.Error())
return err
cryptfs.Warn.Printf("createHeader: Fallocate failed: %s\n", err.Error())
return err
}
// Actually write header