Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Commit

Permalink
remove O_NOFOLLOW flag not supported on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
schomatis committed Nov 1, 2021
1 parent f780394 commit a322a7f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions filewriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"io"
"os"
"path/filepath"
"syscall"
)

var ErrInvalidDirectoryEntry = errors.New("invalid directory entry name")
Expand All @@ -23,7 +22,7 @@ func WriteTo(nd Node, fpath string) error {
case *Symlink:
return os.Symlink(nd.Target, fpath)
case File:
f, err := os.OpenFile(fpath, os.O_EXCL|os.O_CREATE|os.O_WRONLY|syscall.O_NOFOLLOW, 0666)
f, err := os.OpenFile(fpath, os.O_EXCL|os.O_CREATE|os.O_WRONLY, 0666)
defer f.Close()
if err != nil {
return err
Expand Down

0 comments on commit a322a7f

Please sign in to comment.