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

Issue 4758051: code review 4758051: path/filepath: fixes for windows paths (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 9 months ago by brainman
Modified:
13 years, 9 months ago
Reviewers:
CC:
golang-dev, adg, mattn
Visibility:
Public.

Description

path/filepath: fixes for windows paths - Clean and IsAbs to handle paths with drive letter properly. - Clean to replace / with \.

Patch Set 1 #

Patch Set 2 : diff -r 3be72c2cebab https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 3be72c2cebab https://go.googlecode.com/hg/ #

Total comments: 6

Patch Set 4 : diff -r 3be72c2cebab https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r a9bf9aafff7a https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -24 lines) Patch
M src/pkg/go/scanner/scanner_test.go View 1 2 3 2 chunks +11 lines, -4 lines 0 comments Download
M src/pkg/path/filepath/path.go View 1 2 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/path/filepath/path_test.go View 1 2 3 2 chunks +39 lines, -7 lines 0 comments Download
M src/pkg/path/filepath/path_windows.go View 1 1 chunk +14 lines, -8 lines 0 comments Download

Messages

Total messages: 3
brainman
Hello golang-dev@googlegroups.com (cc: mattn.jp@gmail.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 9 months ago (2011-07-18 04:46:11 UTC) #1
adg
LGTM http://codereview.appspot.com/4758051/diff/3005/src/pkg/go/scanner/scanner_test.go File src/pkg/go/scanner/scanner_test.go (right): http://codereview.appspot.com/4758051/diff/3005/src/pkg/go/scanner/scanner_test.go#newcode472 src/pkg/go/scanner/scanner_test.go:472: segments = append(segments, unixsegments...) again, use a function-scoped ...
13 years, 9 months ago (2011-07-18 06:01:29 UTC) #2
brainman
13 years, 9 months ago (2011-07-18 07:08:22 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=c32724dcea9d ***

path/filepath: fixes for windows paths

- Clean and IsAbs to handle paths with drive letter properly.
- Clean to replace / with \.

R=golang-dev, adg
CC=golang-dev, mattn.jp
http://codereview.appspot.com/4758051

http://codereview.appspot.com/4758051/diff/3005/src/pkg/go/scanner/scanner_te...
File src/pkg/go/scanner/scanner_test.go (right):

http://codereview.appspot.com/4758051/diff/3005/src/pkg/go/scanner/scanner_te...
src/pkg/go/scanner/scanner_test.go:472: segments = append(segments,
unixsegments...)
On 2011/07/18 06:01:29, adg wrote:
> again, use a function-scoped variable instead.

Done.

http://codereview.appspot.com/4758051/diff/3005/src/pkg/path/filepath/path_te...
File src/pkg/path/filepath/path_test.go (right):

http://codereview.appspot.com/4758051/diff/3005/src/pkg/path/filepath/path_te...
src/pkg/path/filepath/path_test.go:71: {`c:`, `c:.`},
On 2011/07/18 06:01:29, adg wrote:
> This behavior seems arbitrary. What's the rationale? ...

All wincleantests (bar last) are just repeats of some cleantests with "c:" drive
letter in front. These are to test Clean for windows specific paths, the ones
that have drive letter included.

http://codereview.appspot.com/4758051/diff/3005/src/pkg/path/filepath/path_te...
src/pkg/path/filepath/path_test.go:86: cleantests = append(cleantests,
wincleantests...)
On 2011/07/18 06:01:29, adg wrote:
> Use a function-scoped variable here instead of modifying the global. Doesn't
> matter in this case but it's good practice.

Done.
Sign in to reply to this message.

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