mirror of
https://github.com/octoleo/restic.git
synced 2024-11-24 21:57:41 +00:00
restic: cleanup node type determination
os.ModeCharDevice is already included in os.ModeType
This commit is contained in:
parent
d4b8abd3e2
commit
c95de54726
@ -109,7 +109,7 @@ func NodeFromFileInfo(path string, fi os.FileInfo) (*Node, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func nodeTypeFromFileInfo(fi os.FileInfo) string {
|
func nodeTypeFromFileInfo(fi os.FileInfo) string {
|
||||||
switch fi.Mode() & (os.ModeType | os.ModeCharDevice) {
|
switch fi.Mode() & os.ModeType {
|
||||||
case 0:
|
case 0:
|
||||||
return "file"
|
return "file"
|
||||||
case os.ModeDir:
|
case os.ModeDir:
|
||||||
|
Loading…
Reference in New Issue
Block a user