aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/path/filepath
AgeCommit message (Collapse)Author
2014-09-08build: move package sources from src/pkg to srcRuss Cox
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.
2014-08-22path, path/filepath: remove dead codeDave Cheney
Fixes #8503. Thanks to no.smile.face for the original report. LGTM=bradfitz, r, ruiu R=bradfitz, ruiu, r CC=golang-codereviews https://golang.org/cl/132730043
2014-08-22path/filepath: make Abs handle paths like c:a.txt properlyAlex Brainman
Fixes #8145. LGTM=r R=golang-codereviews, r CC=golang-codereviews https://golang.org/cl/126440043
2014-08-07path/filepath: do not restore original working directory twice in testAlex Brainman
LGTM=dave R=golang-codereviews, dave CC=golang-codereviews https://golang.org/cl/122910043
2014-07-17os: Implement symlink support for WindowsMichael Fraenkel
Fixes #5750. https://code.google.com/p/go/issues/detail?id=5750 os: Separate windows from posix. Implement windows support. path/filepath: Use the same implementation as other platforms syscall: Add/rework new APIs for Windows LGTM=alex.brainman R=golang-codereviews, alex.brainman, gobot, rsc, minux CC=golang-codereviews https://golang.org/cl/86160044
2014-05-20build: make nacl passRuss Cox
Add nacl.bash, the NaCl version of all.bash. It's a separate script because it builds a variant of package syscall with a large zip file embedded in it, containing all the input files needed for tests. Disable various tests new since the last round, mostly the ones using os/exec. Fixes #7945. LGTM=dave R=golang-codereviews, remyoudompheng, dave, bradfitz CC=golang-codereviews https://golang.org/cl/100590044
2014-03-11path/filepath: fixed misaligned comment.Kay Zhu
The comment for 'Clean' function is prepended with spaces instead of a single tab, resulting in visually misaligned comment in the generated documentation. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/73840043
2014-03-04path/filepath: ensure Glob does not ignore broken symlinksKelsey Hightower
Fixes #6463. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/69870050
2014-02-25all: merge NaCl branch (part 1)Dave Cheney
See golang.org/s/go13nacl for design overview. This CL is the mostly mechanical changes from rsc's Go 1.2 based NaCl branch, specifically 39cb35750369 to 500771b477cf from https://code.google.com/r/rsc-go13nacl. This CL does not include working NaCl support, there are probably two or three more large merges to come. CL 15750044 is not included as it involves more invasive changes to the linker which will need to be merged separately. The exact change lists included are 15050047: syscall: support for Native Client 15360044: syscall: unzip implementation for Native Client 15370044: syscall: Native Client SRPC implementation 15400047: cmd/dist, cmd/go, go/build, test: support for Native Client 15410048: runtime: support for Native Client 15410049: syscall: file descriptor table for Native Client 15410050: syscall: in-memory file system for Native Client 15440048: all: update +build lines for Native Client port 15540045: cmd/6g, cmd/8g, cmd/gc: support for Native Client 15570045: os: support for Native Client 15680044: crypto/..., hash/crc32, reflect, sync/atomic: support for amd64p32 15690044: net: support for Native Client 15690048: runtime: support for fake time like on Go Playground 15690051: build: disable various tests on Native Client LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/68150047
2014-01-07all: add solaris build tagsAram Hăvărneanu
R=golang-codereviews, minux.ma, gobot, rsc, dave CC=golang-codereviews https://golang.org/cl/36040043
2013-12-17os, path/filepath: don't ignore Lstat errors in ReaddirBrad Fitzpatrick
os: don't ignore LStat errors in Readdir. If it's ENOENT, on the second pass, just treat it as missing. If it's another error, it's real. path/filepath: use ReaddirNames instead of Readdir in Walk, in order to obey the documented WalkFunc contract of returning each walked item's LStat error, if any. Fixes #6656 Fixes #6680 R=golang-dev, r CC=golang-dev https://golang.org/cl/43530043
2013-12-17all: add missing copyrightChaiShushan
R=golang-dev, iant CC=golang-dev https://golang.org/cl/43290043
2013-09-09path/filepath: fix race with other testsRuss Cox
Bug3486 tried to walk the entire file tree, but other tests might be creating and removing files in that tree. In particular, package os creates and removes files in the os directory, and issue 5863 reports failures due to seeing those files appear and then disappear. Change the test to walk just the test tree, which should not be changing. Fixes #5863. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/13467045
2013-08-24all: dragonfly supportJoel Sing
Enable remaining packages (crypto, mime, path, time) to build on dragonfly. R=bradfitz CC=golang-dev https://golang.org/cl/13190043
2013-08-21all: protect alloc count tests by -testing.shortRob Pike
Update #5000 Should reduce the flakiness a little. Malloc counting is important to general testing but not to the build dashboard, which uses -short. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/12866047
2013-07-31path/filepath: Panic in Match when parsing invalid character range.Pieter Droogendijk
Fixes #5668. R=golang-dev, rsc, r CC=golang-dev https://golang.org/cl/12001056
2013-05-24path/filepath: Skip TestEvalSymlinks. Plan 9 doesn't have symlinks.Christopher Nielsen
R=golang-dev, r CC=golang-dev https://golang.org/cl/9713044
2013-03-06all: Skip AllocsPerRun tests if GOMAXPROCS>1.Albert Strasheim
Fixes #4974. R=rsc, bradfitz, r CC=golang-dev https://golang.org/cl/7545043
2013-03-01path/filepath: better error reporting during TestWinSplitListTestsAreValidAlex Brainman
Fixes #4930. R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/7424043
2013-02-20path/filepath, os/exec: unquote PATH elements on WindowsPéter Surányi
On Windows, directory names in PATH can be fully or partially quoted in double quotes ('"'), but the path names as used by most APIs must be unquoted. In addition, quoted names can contain the semicolon (';') character, which is otherwise used as ListSeparator. This CL changes SplitList in path/filepath and LookPath in os/exec to only treat unquoted semicolons as separators, and to unquote the separated elements. (In addition, fix harmless test bug I introduced for LookPath on Unix.) Related discussion thread: https://groups.google.com/d/msg/golang-nuts/PXCr10DsRb4/sawZBM7scYgJ R=rsc, minux.ma, mccoyst, alex.brainman, iant CC=golang-dev https://golang.org/cl/7181047
2013-02-19path/filepath: add examples for SplitList and Rel.Kamil Kisiel
R=golang-dev, bradfitz, minux.ma CC=golang-dev https://golang.org/cl/7291043
2013-02-19path/filepath: document Dir betterRuss Cox
This comment matches the one in path. Fixes #4837. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7305100
2013-02-19src: use internal tests if possibleRobin Eklind
If a test can be placed in the same package ("internal"), it is placed there. This facilitates testing of package-private details. Because of dependency cycles some packages cannot be tested by internal tests. R=golang-dev, rsc, mikioh.mikioh CC=golang-dev, r https://golang.org/cl/7323044
2013-02-04path/filepath: document that Walk does not follow symlinksRuss Cox
Fixes #4759. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7304043
2013-02-02testing: add AllocsPerRunKyle Lemons
This CL also replaces similar loops in other stdlib package tests with calls to AllocsPerRun. Fixes #4461. R=minux.ma, rsc CC=golang-dev https://golang.org/cl/7002055
2012-12-01all: set GOMAXPROCS to 1 when counting mallocsShenghou Ma
also fix an annoying test that relies on $GOROOT be set. Fixes #3690. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6844086
2012-10-30gofmt: apply gofmt -w src miscRobert Griesemer
Remove trailing whitespace in comments. No other changes. R=r CC=golang-dev https://golang.org/cl/6815053
2012-10-17path/filepath: better documentation for WalkFuncRob Pike
Define the properties of the arguments better. In particular, explain that the path is (sort of) relative to the argument to Walk. Fixes #4119. R=golang-dev, iant CC=golang-dev https://golang.org/cl/6721048
2012-08-05syscall: return EINVAL when string arguments have NUL charactersAlexey Borzenkov
Since NUL usually terminates strings in underlying syscalls, allowing it when converting string arguments is a security risk, especially when dealing with filenames. For example, a program might reason that filename like "/root/..\x00/" is a subdirectory or "/root/" and allow access to it, while underlying syscall will treat "\x00" as an end of that string and the actual filename will be "/root/..", which might be unexpected. Returning EINVAL when string arguments have NUL in them makes sure this attack vector is unusable. R=golang-dev, r, bradfitz, fullung, rsc, minux.ma CC=golang-dev https://golang.org/cl/6458050
2012-06-30path/filepath: avoid allocation in Clean of cleaned path even on windows ↵Alex Brainman
(fix build) R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6344049
2012-06-28path/filepath: add test case for rooted ".."Han-Wen Nienhuys
R=golang-dev, r CC=golang-dev https://golang.org/cl/6350047
2012-06-27path/filepath: avoid allocation in Clean of cleaned pathRuss Cox
Alternative to https://golang.org/cl/6330044. Fixes #3681. R=golang-dev, r, hanwen, iant CC=golang-dev https://golang.org/cl/6335056
2012-06-04path/filepath: fix testMikio Hara
Make it possible to run test over symlinked GOROOT. R=golang-dev, r CC=golang-dev https://golang.org/cl/6268046
2012-06-02path/filepath: implement documented SkipDir behaviorJan Mercl
Currently walk() doesn't check for err == SkipDir when iterating a directory list, but such promise is made in the docs for WalkFunc. Fixes #3486. R=rsc, r CC=golang-dev https://golang.org/cl/6257059
2012-04-27path/filepath: fix typoAnthony Martin
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/6117063
2012-04-24path: document that Clean deletes trailing slashes.Rob Pike
Fixes #3492. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6112044
2012-04-05path/filepath: move out of temp directory before deleting it in TestAbsAlex Brainman
Fixes #3476. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5986045
2012-03-28path/filepath: correct comment in EvalSymlinksAlex Brainman
R=golang-dev, r CC=golang-dev, hcwfrichter https://golang.org/cl/5934046
2012-03-27path/filepath: use windows GetShortPathName api to force GetLongPathName to ↵Alex Brainman
do its work R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5928043
2012-03-27path/filepath: convert drive letter to upper case in windows EvalSymlinksAlex Brainman
Fixes #3347. R=golang-dev, aram, r, rsc CC=golang-dev https://golang.org/cl/5918043
2012-03-23path/filepath: windows drive letter cannot be a digitAlex Brainman
R=golang-dev, r CC=golang-dev, mattn.jp https://golang.org/cl/5885056
2012-03-19path/filepath: implement Match and Glob on windowsAlex Brainman
As discussed on golang-dev, windows will use "\" as path separator. No escaping allowed. R=golang-dev, r, mattn.jp, rsc, rogpeppe, bsiegert, r CC=golang-dev https://golang.org/cl/5825044
2012-03-08all: gofmt -w -s src miscRobert Griesemer
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5781058
2012-03-08path/filepath: retrieve real file name in windows EvalSymlinksAlex Brainman
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5756049
2012-03-07os: fix SameFile to work for directories on windowsAlex Brainman
R=golang-dev, r CC=golang-dev https://golang.org/cl/5756064
2012-03-07path/filepath: disable AbsTest on windowsRob Pike
SameFile has a bug. R=golang-dev TBR=rsc CC=golang-dev https://golang.org/cl/5754055
2012-03-07path/filepath/path_test.go: repair and enable TestAbsRob Pike
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5759051
2012-02-29path/filepath: steer people away from HasPrefixRuss Cox
The strikes against it are: 1. It does not take path boundaries into account. 2. It assumes that Windows==case-insensitive file system and non-Windows==case-sensitive file system, neither of which is always true. 3. Comparing ToLower against ToLower is not a correct implementation of a case-insensitive string comparison. 4. If it returns true on Windows you still don't know how long the matching prefix is in bytes, so you can't compute what the suffix is. R=golang-dev, r, dsymonds, r CC=golang-dev https://golang.org/cl/5712045
2012-02-29path/filepath: note that SplitList is different from strings.SplitRuss Cox
R=golang-dev, r, bradfitz, gustavo CC=golang-dev https://golang.org/cl/5712044
2012-02-17path/filepath: fix test on darwinRob Pike
/tmp being itself a symlink causes problems for the test, so use / as the absolute path. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5675070