aboutsummaryrefslogtreecommitdiff
path: root/init_dir.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2019-08-04 14:13:00 +0200
committerJakob Unterwurzacher2019-08-04 14:13:00 +0200
commitb1d09b0f17dd8b2fe9e47289d1743d0a730c7c42 (patch)
treef1a24ca60448bd692d8846da97907a6f4887a641 /init_dir.go
parent13055278f56b941be0ea1ff4eb4840d88fba7e37 (diff)
Rename isDirEmpty -> isEmptyDir
The function actually answers the question: "is this an empty dir"?
Diffstat (limited to 'init_dir.go')
-rw-r--r--init_dir.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/init_dir.go b/init_dir.go
index a9c66e3..aea8b30 100644
--- a/init_dir.go
+++ b/init_dir.go
@@ -17,9 +17,9 @@ import (
"github.com/rfjakob/gocryptfs/internal/tlog"
)
-// isDirEmpty checks if "dir" exists and is an empty directory.
+// isEmptyDir checks if "dir" exists and is an empty directory.
// Returns an *os.PathError if Stat() on the path fails.
-func isDirEmpty(dir string) error {
+func isEmptyDir(dir string) error {
err := isDir(dir)
if err != nil {
return err
@@ -61,7 +61,7 @@ func initDir(args *argContainer) {
os.Exit(exitcodes.Init)
}
} else {
- err = isDirEmpty(args.cipherdir)
+ err = isEmptyDir(args.cipherdir)
if err != nil {
tlog.Fatal.Printf("Invalid cipherdir: %v", err)
os.Exit(exitcodes.Init)