Do not error when chmod failes when permissions are ignored (fixes #1404).

This commit is contained in:
Lode Hoste committed 2015-03-07 21:38:16 +01:00
1 parent 6057138466
commit 758233f001
3 files changed
+18 -16

No files matched your search

+2 -2
View File
@@ -93,7 +93,7 @@ func generateFiles(dir string, files, maxexp int, srcname string) error {
}
err = os.Chmod(p1, os.FileMode(rand.Intn(0777)|0400))
if err != nil {
if !ignorePerms && err != nil {
return err
}
@@ -152,7 +152,7 @@ func alterFiles(dir string) error {
if info.Mode()&0200 != 0200 {
// Not owner writable. Fix.
err = os.Chmod(path, 0644)
if err != nil {
if !ignorePerms && err != nil {
return err
}
}