Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func switchboard(src, dest string, info os.FileInfo, opt Options) (err error) {
}

switch {
case info.Mode()&os.ModeSymlink != 0:
case info.Mode()&os.ModeSymlink != 0 || info.Mode()&os.ModeIrregular != 0:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just adding another case?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, It's your code. If the junctions are handled the same way as symlinks the result is the same. I'm not sure if they require any special handling so I put it in one case.

err = onsymlink(src, dest, opt)
case info.IsDir():
err = dcopy(src, dest, info, opt)
Expand Down
Loading