Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(544)

Unified Diff: libgo/go/path/match.go

Issue 4035044: code review 4035044: Update to current version of Go library. (Closed)
Patch Set: Created 14 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « libgo/go/os/path_test.go ('k') | libgo/go/path/path.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libgo/go/path/match.go
===================================================================
--- a/libgo/go/path/match.go
+++ b/libgo/go/path/match.go
@@ -240,9 +240,13 @@
// glob searches for files matching pattern in the directory dir
// and appends them to matches.
func glob(dir, pattern string, matches []string) []string {
- if fi, err := os.Stat(dir); err != nil || !fi.IsDirectory() {
+ fi, err := os.Stat(dir)
+ if err != nil {
return nil
}
+ if !fi.IsDirectory() {
+ return matches
+ }
d, err := os.Open(dir, os.O_RDONLY, 0666)
if err != nil {
return nil
« no previous file with comments | « libgo/go/os/path_test.go ('k') | libgo/go/path/path.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b