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

Issue 3015042: code review 3015042: path: Fix Glob when it finds a file in directory position. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 5 months ago by iant
Modified:
13 years, 5 months ago
Reviewers:
CC:
r, bsiegert, golang-dev
Visibility:
Public.

Description

path: Fix Glob when it finds a file in directory position. When searching a list of directories, the files which match the pattern are accumulated in a slice. If the glob has a wildcard for the directory, and the wildcard matches a file rather than a directory, then the files found so far are discarded. E.g., path.Glob("*/x") in a directory which contains both files and subdirectories. This patch avoids discarding matches found so far when a file is found.

Patch Set 1 #

Patch Set 2 : code review 3015042: path: Fix Glob when it finds a file in directory position. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M src/pkg/path/match.go View 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 3
iant
Hello r (cc: bsiegert@gmail.com, golang-dev@googlegroups.com), I'd like you to review this change.
13 years, 5 months ago (2010-11-10 21:20:09 UTC) #1
r
LGTM
13 years, 5 months ago (2010-11-10 21:25:19 UTC) #2
iant
13 years, 5 months ago (2010-11-10 21:25:54 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=224b68eabfeb ***

path: Fix Glob when it finds a file in directory position.

When searching a list of directories, the files which match
the pattern are accumulated in a slice.  If the glob has a
wildcard for the directory, and the wildcard matches a file
rather than a directory, then the files found so far are
discarded.  E.g., path.Glob("*/x") in a directory which
contains both files and subdirectories.  This patch avoids
discarding matches found so far when a file is found.

R=r
CC=bsiegert, golang-dev
http://codereview.appspot.com/3015042
Sign in to reply to this message.

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