1
0
mirror of https://github.com/go-task/task.git synced 2025-08-08 22:36:57 +02:00

feat: more permissive file modes

This commit is contained in:
Pete Davison
2024-02-22 18:59:06 +00:00
parent 98e0cea469
commit fa40e8a762

View File

@ -35,7 +35,10 @@ func Exists(path string) (string, error) {
if err != nil {
return "", err
}
if fi.Mode().IsRegular() {
if fi.Mode().IsRegular() ||
fi.Mode()&os.ModeDevice != 0 ||
fi.Mode()&os.ModeSymlink != 0 ||
fi.Mode()&os.ModeNamedPipe != 0 {
return filepath.Abs(path)
}