mirror of
https://github.com/restic/restic.git
synced 2025-08-14 08:07:39 +00:00
Don't panic on mknod on Windows
Instead return an error.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package restic
|
package restic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"os"
|
"os"
|
||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
@@ -13,7 +14,7 @@ func (node *Node) OpenForReading() (*os.File, error) {
|
|||||||
// special file, or named pipe) named pathname, with attributes
|
// special file, or named pipe) named pathname, with attributes
|
||||||
// specified by mode and dev.
|
// specified by mode and dev.
|
||||||
var mknod = func(path string, mode uint32, dev int) (err error) {
|
var mknod = func(path string, mode uint32, dev int) (err error) {
|
||||||
panic("mknod not implemented")
|
return errors.New("device nodes cannot be created on windows")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Windows doesn't need lchown
|
// Windows doesn't need lchown
|
||||||
|
Reference in New Issue
Block a user