aboutsummaryrefslogtreecommitdiff
path: root/filesystem/path.go
diff options
context:
space:
mode:
authorebiggers <ebiggers@google.com>2019-09-08 19:46:59 -0700
committerJoseph Richey <joerichey@google.com>2019-09-08 19:46:59 -0700
commit6445dad7d66fa6a1867090fcd9602c98863649f6 (patch)
treec0e5209f018a50ee8b0a1277cc7b06266eff18c1 /filesystem/path.go
parent28b29d1c97ffd97671186b5e1fae37b64424f9ee (diff)
Fix various typos and grammatical errors (#141)
These were found by a combination of manual review and a custom script that checks for common errors. Also removed an outdated sentence from the comment for setupBefore().
Diffstat (limited to 'filesystem/path.go')
-rw-r--r--filesystem/path.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/filesystem/path.go b/filesystem/path.go
index d788a6b..5fd3fdf 100644
--- a/filesystem/path.go
+++ b/filesystem/path.go
@@ -30,8 +30,8 @@ import (
// We only check the unix permissions and the sticky bit
const permMask = os.ModeSticky | os.ModePerm
-// cannonicalizePath turns path into an absolute path without symlinks.
-func cannonicalizePath(path string) (string, error) {
+// canonicalizePath turns path into an absolute path without symlinks.
+func canonicalizePath(path string) (string, error) {
path, err := filepath.Abs(path)
if err != nil {
return "", err
@@ -62,14 +62,14 @@ func isDir(path string) bool {
return err == nil && info.IsDir()
}
-// isDevice returns true if the path exists and is that of a directory.
+// isDevice returns true if the path exists and is that of a device.
func isDevice(path string) bool {
info, err := loggedStat(path)
return err == nil && info.Mode()&os.ModeDevice != 0
}
// isDirCheckPerm returns true if the path exists and is a directory. If the
-// specified permissions and sticky bit of mode do not match the path, and error
+// specified permissions and sticky bit of mode do not match the path, an error
// is logged.
func isDirCheckPerm(path string, mode os.FileMode) bool {
info, err := loggedStat(path)