diff --git a/test/sharness/t0020-init.sh b/test/sharness/t0020-init.sh index d54af7d3c1e..6d2bfa26fda 100755 --- a/test/sharness/t0020-init.sh +++ b/test/sharness/t0020-init.sh @@ -63,7 +63,8 @@ test_expect_success ".ipfs/ has been created" ' test -d ".ipfs" && test -f ".ipfs/config" && test -d ".ipfs/datastore" && - test -d ".ipfs/blocks" || + test -d ".ipfs/blocks" && + test ! -f ._check_writeable || test_fsh ls -al .ipfs ' diff --git a/thirdparty/dir/dir.go b/thirdparty/dir/dir.go index 90554dce15c..96e383aa543 100644 --- a/thirdparty/dir/dir.go +++ b/thirdparty/dir/dir.go @@ -16,6 +16,7 @@ func Writable(path string) error { } // Check the directory is writeable if f, err := os.Create(filepath.Join(path, "._check_writeable")); err == nil { + f.Close() os.Remove(f.Name()) } else { return errors.New("'" + path + "' is not writeable")