-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
os: fix windows Lstat missing name for some files
On Windows, GetFileAttributesEx fails with ERROR_SHARING_VIOLATION for some files, like c:\pagefile.sys. In this case, newFileStatFromWin32finddata is used to fill file info, but it does not fill name and path. After getting file stat from newFileStatFromWin32finddata, just set file info name and path before return fixes the issue. Fixes #30883 Change-Id: I654e96c634e8a9bf5ce7e1aaa93968e88953620d Reviewed-on: https://go-review.googlesource.com/c/go/+/167779 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
- Loading branch information
1 parent
e0181ff
commit 9e0e9ac
Showing
3 changed files
with
26 additions
and
10 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