2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-01 16:40:50 +00:00

restic: cleanup node type determination

os.ModeCharDevice is already included in os.ModeType
This commit is contained in:
Michael Eischer 2024-01-06 18:43:16 +01:00
parent 634e2a46d9
commit 0018bb7854

View File

@ -109,7 +109,7 @@ func NodeFromFileInfo(path string, fi os.FileInfo) (*Node, error) {
}
func nodeTypeFromFileInfo(fi os.FileInfo) string {
switch fi.Mode() & (os.ModeType | os.ModeCharDevice) {
switch fi.Mode() & os.ModeType {
case 0:
return "file"
case os.ModeDir: