mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 20:26:19 +08:00
fix bug
This commit is contained in:
parent
c2efe31957
commit
a507f61c7c
@ -78,9 +78,9 @@ func loadSystemRoots() (*CertPool, error) {
|
|||||||
return nil, firstErr
|
return nil, firstErr
|
||||||
}
|
}
|
||||||
|
|
||||||
// readUniqueDirectoryEntries is like ioutil.ReadDir but omits
|
// readUniqueDirectoryEntries is like os.ReadDir but omits
|
||||||
// symlinks that point within the directory.
|
// symlinks that point within the directory.
|
||||||
func readUniqueDirectoryEntries(dir string) ([]os.FileInfo, error) {
|
func readUniqueDirectoryEntries(dir string) ([]fs.DirEntry, error) {
|
||||||
files, err := os.ReadDir(dir)
|
files, err := os.ReadDir(dir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -94,6 +94,7 @@ func readUniqueDirectoryEntries(dir string) ([]os.FileInfo, error) {
|
|||||||
return uniq, nil
|
return uniq, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// isSameDirSymlink reports whether fi in dir is a symlink with a
|
// isSameDirSymlink reports whether fi in dir is a symlink with a
|
||||||
// target not containing a slash.
|
// target not containing a slash.
|
||||||
func isSameDirSymlink(f fs.DirEntry, dir string) bool {
|
func isSameDirSymlink(f fs.DirEntry, dir string) bool {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user