mirror of https://github.com/hak5/overseer.git
filter only "not supported" errors
parent
1956e2633b
commit
8d4da1aec4
|
@ -8,6 +8,7 @@ import (
|
|||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
|
@ -36,11 +37,15 @@ func move(dst, src string) error {
|
|||
}
|
||||
|
||||
func chmod(f *os.File, perms os.FileMode) error {
|
||||
_ = f.Chmod(perms)
|
||||
if err := f.Chmod(perms); err != nil && !strings.Contains(err.Error(), "not supported") {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func chown(f *os.File, uid, gid int) error {
|
||||
_ = f.Chown(uid, gid)
|
||||
if err := f.Chown(uid, gid); err != nil && !strings.Contains(err.Error(), "not supported") {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue