-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified scan to extract device ID from existing stat info.
It turns out we were being a bit silly and re-lstating each directory during a scan to get the device ID. We already have the directory stat information, so we can just pass that down and extract the device ID from that.
- Loading branch information
1 parent
bef1a6f
commit c046e9f
Showing
4 changed files
with
37 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
package filesystem | ||
|
||
func DeviceID(_ string) (uint64, error) { | ||
import ( | ||
"os" | ||
) | ||
|
||
// DeviceID on Windows is a no-op that returns 0 and never fails. It's not | ||
// necessary for our purposes on Windows since directory hierarchies can't span | ||
// devices. | ||
func DeviceID(_ os.FileInfo) (uint64, error) { | ||
return 0, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters