Note that I'm not very categorical in my issue title, but this debugging of a subtle Afero file system bug has given me enough gray hairs to at least deserve an issue/discussion.
The program below runs fine on *nix but fails on Windows (it compiles fine):
package main
import (
"log"
"os"
"syscall"
)
func main() {
if !os.IsExist(syscall.EEXIST) {
log.Fatal("failed")
}
}
I assume that syscall.EEXIST will never happen on Windows, and then it should probably also not be defined for Windows. I guess that ship has sailed, but you should then consider to expand os.IsExist on Windows to also include this error. Because there may be other people creating file system abstractions that can be bitten by this.
/cc @spf13
Note that I'm not very categorical in my issue title, but this debugging of a subtle Afero file system bug has given me enough gray hairs to at least deserve an issue/discussion.
The program below runs fine on *nix but fails on Windows (it compiles fine):
I assume that
syscall.EEXISTwill never happen on Windows, and then it should probably also not be defined for Windows. I guess that ship has sailed, but you should then consider to expandos.IsExiston Windows to also include this error. Because there may be other people creating file system abstractions that can be bitten by this./cc @spf13