<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/path/filepath/path_windows_test.go, branch json-isValidNumber-before</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=json-isValidNumber-before</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=json-isValidNumber-before'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2023-01-24T07:42:17Z</updated>
<entry>
<title>path/filepath: remove extra Clean call in EvalSymlinks on Windows</title>
<updated>2023-01-24T07:42:17Z</updated>
<author>
<name>qmuntal</name>
<email>quimmuntal@gmail.com</email>
</author>
<published>2022-12-01T20:59:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=030ca34f5786f0b924dcab26379ee2f82104220d'/>
<id>urn:sha1:030ca34f5786f0b924dcab26379ee2f82104220d</id>
<content type='text'>
EvalSymlinks calls Clean twice, one in walkSymlinks and another in
toNorm. The later is not necessary, as toNorm is only called by
EvalSymlinks and just after walkSymlinks cleans the path without any
path manipulation in between.

Change-Id: Ibdb782c7eed59468f0ebb913e98d2a7db0df010d
Reviewed-on: https://go-review.googlesource.com/c/go/+/454615
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Run-TryBot: Quim Muntal &lt;quimmuntal@gmail.com&gt;
</content>
</entry>
<entry>
<title>path/filepath: detect all forms of \\ volume paths on Windows</title>
<updated>2022-11-09T22:06:00Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-10-19T21:41:03Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=be9d78c9c5905fbc10d8cd6a4714dd4ad1c91674'/>
<id>urn:sha1:be9d78c9c5905fbc10d8cd6a4714dd4ad1c91674</id>
<content type='text'>
Previously, the volumeNameLen function checked for UNC paths starting
with two slashes, a non-'.' character, and another slash. This misses
volume names such as "\\.\C:\".

The previous check for volume names rejects paths beginning
with "\\.". This is incorrect, because while these names are not
UNC paths, "\\.\C:\" is a DOS device path prefix indicating the
C: device. It also misses UNC path prefixes in the form
"\\.\UNC\server\share\".

The previous check for UNC paths also rejects any path with an
empty or missing host or share component. This leads to a number
of possibly-incorrect behaviors, such as Clean(`\\a`) returning `\a`.
Converting the semantically-significant `\\` prefix to a single `\`
seems wrong.

Consistently treat paths beginning with two separators as having
a volume prefix.

Update VolumeName to detect DOS device paths (`\\.\` or `\\?\`),
DOS device paths linking to UNC paths (`\\.\UNC\Server\Share`
or `\\?\UNC\Server\Share`), and UNC paths (`\\Server\Share\`).

	Clean(`\\a`) = `\\a`
	Join(`\\`, `a`, `b`) = `\\a\b`

In addition, normalize path separators in VolumeName for consistency
with other functions which Clean their result.

Fixes #56336

Change-Id: Id01c33029585bfffc313dcf0ad42ff6ac7ce42fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/444280
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Quim Muntal &lt;quimmuntal@gmail.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Roland Shoemaker &lt;roland@golang.org&gt;
</content>
</entry>
<entry>
<title>path/filepath: do not remove prefix "." when following path contains ":".</title>
<updated>2022-05-24T21:52:14Z</updated>
<author>
<name>Yasuhiro Matsumoto</name>
<email>mattn.jp@gmail.com</email>
</author>
<published>2022-04-22T01:07:51Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=9cd1818a7d019c02fa4898b3e45a323e35033290'/>
<id>urn:sha1:9cd1818a7d019c02fa4898b3e45a323e35033290</id>
<content type='text'>
Fixes #52476

Change-Id: I9eb72ac7dbccd6322d060291f31831dc389eb9bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/401595
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Alex Brainman &lt;alex.brainman@gmail.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>all: gofmt main repo</title>
<updated>2022-04-11T16:34:30Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2022-02-03T19:12:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=19309779ac5e2f5a2fd3cbb34421dafb2855ac21'/>
<id>urn:sha1:19309779ac5e2f5a2fd3cbb34421dafb2855ac21</id>
<content type='text'>
[This CL is part of a sequence implementing the proposal #51082.
The design doc is at https://go.dev/s/godocfmt-design.]

Run the updated gofmt, which reformats doc comments,
on the main repository. Vendored files are excluded.

For #51082.

Change-Id: I7332f099b60f716295fb34719c98c04eb1a85407
Reviewed-on: https://go-review.googlesource.com/c/go/+/384268
Reviewed-by: Jonathan Amsterdam &lt;jba@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>path/filepath: replace os.MkdirTemp with T.TempDir</title>
<updated>2021-04-10T08:13:32Z</updated>
<author>
<name>Manlio Perillo</name>
<email>manlio.perillo@gmail.com</email>
</author>
<published>2021-04-07T14:48:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=11f159456b1dba3ec499da916852dd188d1e04a7'/>
<id>urn:sha1:11f159456b1dba3ec499da916852dd188d1e04a7</id>
<content type='text'>
Add the tempDirCanonical function, for tests that need a temporary
directory that does not contain symlinks.

Updates #45402

Change-Id: I3d08ef32ef911331544acce3d7d013b4c3382960
Reviewed-on: https://go-review.googlesource.com/c/go/+/308011
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
</content>
</entry>
<entry>
<title>all: update to use os.ReadFile, os.WriteFile, os.CreateTemp, os.MkdirTemp</title>
<updated>2020-12-09T19:12:23Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2020-10-29T18:17:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4f1b0a44cb46f3df28f5ef82e5769ebeac1bc493'/>
<id>urn:sha1:4f1b0a44cb46f3df28f5ef82e5769ebeac1bc493</id>
<content type='text'>
As part of #42026, these helpers from io/ioutil were moved to os.
(ioutil.TempFile and TempDir became os.CreateTemp and MkdirTemp.)

Update the Go tree to use the preferred names.

As usual, code compiled with the Go 1.4 bootstrap toolchain
and code vendored from other sources is excluded.

ReadDir changes are in a separate CL, because they are not a
simple search and replace.

For #42026.

Change-Id: If318df0216d57e95ea0c4093b89f65e5b0ababb3
Reviewed-on: https://go-review.googlesource.com/c/go/+/266365
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>path/filepath: allow EvalSymlinks to work on UNC share roots on Windows</title>
<updated>2020-10-25T07:51:58Z</updated>
<author>
<name>Kevin Parsons</name>
<email>kevpar@microsoft.com</email>
</author>
<published>2020-10-20T15:15:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=94887410d41eb29ea4f2354e80a6aae4ee602fcf'/>
<id>urn:sha1:94887410d41eb29ea4f2354e80a6aae4ee602fcf</id>
<content type='text'>
Fixes #42079

Previously, EvalSymlinks returned an error when called with the root of
a UNC share (e.g. \\server\share). This was due to Windows's
FindFirstFile function not supporting a share root path.

To resolve this, now return early from toNorm in the case where the path
after the volume name is empty. Skipping the later path component
resolution shouldn't have any negative impact in this case, as if the
path is empty, there aren't any path components to resolve anyways.

The test case uses the localhost admin share (c$), as it should be
present in most situations. This allows testing without setting up an
external file share. However, this fix applies to all UNC share root
paths.

Change-Id: I05035bd86be93662d7bea34fab4b75fc8e918206
GitHub-Last-Rev: bd3db2cda65aae1cdf8d94b03bc7197dff68dc44
GitHub-Pull-Request: golang/go#42096
Reviewed-on: https://go-review.googlesource.com/c/go/+/263917
Trust: Alex Brainman &lt;alex.brainman@gmail.com&gt;
Trust: Giovanni Bajo &lt;rasky@develer.com&gt;
Run-TryBot: Alex Brainman &lt;alex.brainman@gmail.com&gt;
Reviewed-by: Alex Brainman &lt;alex.brainman@gmail.com&gt;
</content>
</entry>
<entry>
<title>all: update references to symbols moved from os to io/fs</title>
<updated>2020-10-20T02:32:42Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2020-07-07T17:49:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=7bb721b9384bdd196befeaed593b185f7f2a5589'/>
<id>urn:sha1:7bb721b9384bdd196befeaed593b185f7f2a5589</id>
<content type='text'>
The old os references are still valid, but update our code
to reflect best practices and get used to the new locations.

Code compiled with the bootstrap toolchain
(cmd/asm, cmd/dist, cmd/compile, debug/elf)
must remain Go 1.4-compatible and is excluded.

For #41190.

Change-Id: I8f9526977867c10a221e2f392f78d7dec073f1bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/243907
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
</content>
</entry>
<entry>
<title>path/filepath: do not call GetFinalPathNameByHandle from EvalSymlinks</title>
<updated>2019-03-01T07:45:00Z</updated>
<author>
<name>Alex Brainman</name>
<email>alex.brainman@gmail.com</email>
</author>
<published>2019-02-28T09:20:40Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=44d3bb998ca00e49d9e0138954287af206b614bf'/>
<id>urn:sha1:44d3bb998ca00e49d9e0138954287af206b614bf</id>
<content type='text'>
EvalSymlinks is using GetFinalPathNameByHandle to handle symlinks with
unusual targets like \??\Volume{ABCD}\. But since CL 164201, os.Readlink
handles path like that too.

So remove all that extra code that EvalSymlinks calls when os.Readlink
fails - it is not needed any more.

Now that windows EvalSymlinks implementation is similar to unix
implementation, we can remove all slashAfterFilePathError related code
too. So do that.

This also makes TestIssue29372 pass even when TMP directory refers to
symlinks with target like \??\Volume{ABCD}\. So remove TestIssue29372
code that helped it pass on windows-arm. TestIssue29372 should pass as
is now.

Fixes #29746

Change-Id: I568d142c89d3297bff8513069bceaa6be51fe7e4
Reviewed-on: https://go-review.googlesource.com/c/164202
Run-TryBot: Alex Brainman &lt;alex.brainman@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>path/filepath: skip part of TestNTNamespaceSymlink</title>
<updated>2019-01-15T10:23:31Z</updated>
<author>
<name>Alex Brainman</name>
<email>alex.brainman@gmail.com</email>
</author>
<published>2019-01-15T08:37:17Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=d82c9a167d9e3a09eb27a00b6125e1a3fea6dc3d'/>
<id>urn:sha1:d82c9a167d9e3a09eb27a00b6125e1a3fea6dc3d</id>
<content type='text'>
Recent CL 156398 extended TestNTNamespaceSymlink. But new code
fails, if user running the test does not have sufficient privilege
to create file symlink. Skip part of TestNTNamespaceSymlink, if
user cannot create symlink.

Fixes #29745

Change-Id: Ie4176429ba9dd98553ce9e91fd19851cc7353f42
Reviewed-on: https://go-review.googlesource.com/c/157917
Run-TryBot: Alex Brainman &lt;alex.brainman@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
</content>
</entry>
</feed>
