From 346c0c0c587f829157b1407c692426d1f0277ed4 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Sun, 16 Aug 2015 13:24:21 +0200 Subject: [PATCH] Don't panic on mknod on Windows Instead return an error. --- node_windows.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node_windows.go b/node_windows.go index 8a210aa01..5a5a9dba3 100644 --- a/node_windows.go +++ b/node_windows.go @@ -1,6 +1,7 @@ package restic import ( + "errors" "os" "syscall" ) @@ -13,7 +14,7 @@ func (node *Node) OpenForReading() (*os.File, error) { // special file, or named pipe) named pathname, with attributes // specified by mode and dev. 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