]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - cmd/safcm-remote/sync/files.go
Improve and add comments
[safcm/safcm.git] / cmd / safcm-remote / sync / files.go
index f3886065803781d8b0c0613766fbe981e8d4f61e..119a3534239f68e2e5d10aee08ec2559590ada87 100644 (file)
@@ -152,8 +152,8 @@ reopen:
                if change.Old.Mode.Type() == fs.ModeSymlink {
                        // Some BSD systems permit changing permissions of
                        // symlinks but ignore them on traversal. To keep it
-                       // simple we don't support that and always use 0777 for
-                       // symlink permissions (the value on GNU/Linux).
+                       // simple we don't support that and always use 0777
+                       // for symlink permissions (the value on GNU/Linux).
                        //
                        // TODO: Add proper support for symlinks on BSD
                        change.Old.Mode |= 0777
@@ -267,7 +267,7 @@ reopen:
                }
        }
 
-       // Directory: create new directory (also type change to directory)
+       // Directory: create new directory, also type change to directory
        if file.Mode.IsDir() && (change.Created || changeType) {
                debugf("creating directory")
                err := os.Mkdir(file.Path, 0700)
@@ -373,7 +373,7 @@ reopen:
                        os.Remove(tmpPath)
                        return err
                }
-               // Permissions are irrelevant for symlinks
+               // Permissions are irrelevant for symlinks (on most systems)
 
        default:
                panic(fmt.Sprintf("invalid file type %s", file.Mode))