Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use filepath.clean instead of path.clean #26404

Merged
merged 4 commits into from
Jan 13, 2023

Conversation

MariusVanDerWijden
Copy link
Member

closes #22367

NOT TESTED UNDER WINDOWS

@holiman
Copy link
Contributor

holiman commented Jan 3, 2023

Failing test:

    test_cmd.go:261: (stderr:21) INFO [01-02|15:39:51.806] IPC endpoint opened                      url=\\.\pipe\\pipe\geth621383

i.e

url=\\.\pipe\\pipe\geth621383
  --- FAIL: TestAttachWelcome/ipc (3.01s)
        run_test.go:107: endpoint \\.\pipe\geth621383 did not open within 3

@fjl
Copy link
Contributor

fjl commented Jan 3, 2023

Named pipe paths are not file paths, they exist in a separate namespace on windows and should not be expanded by this function. Probably best to add a special case for paths starting with \\.\pipe

Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plop

internal/flags/flags.go Outdated Show resolved Hide resolved
"~thisOtherUser/b/": "~thisOtherUser/b",
"$DDDXXX/a/b": "/tmp/a/b",
"/a/b/": "/a/b",
"C:\\Documents\\Newsletters\\": "C:\\Documents\\Newsletters\\",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? Shouldn't the expansion use / path separators?

Suggested change
"C:\\Documents\\Newsletters\\": "C:\\Documents\\Newsletters\\",
"C:\\Documents\\Newsletters\\": "C:\\Documents\\Newsletters\\",

@holiman holiman added this to the 1.11.0 milestone Jan 13, 2023
@holiman holiman merged commit 0e486a5 into ethereum:master Jan 13, 2023
shekhirin pushed a commit to shekhirin/go-ethereum that referenced this pull request Jun 6, 2023
* internal/flags: use filepath.Clean instead of path.Clean

* internal/flags: fix windows pipe issue

* internal/flags: modify test for windows

* internal/flags: use backticks, fix test
gzliudan pushed a commit to gzliudan/XDPoSChain that referenced this pull request Nov 22, 2024
* internal/flags: use filepath.Clean instead of path.Clean

* internal/flags: fix windows pipe issue

* internal/flags: modify test for windows

* internal/flags: use backticks, fix test
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 22, 2024
* internal/flags: use filepath.Clean instead of path.Clean

* internal/flags: fix windows pipe issue

* internal/flags: modify test for windows

* internal/flags: use backticks, fix test
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 22, 2024
* internal/flags: use filepath.Clean instead of path.Clean

* internal/flags: fix windows pipe issue

* internal/flags: modify test for windows

* internal/flags: use backticks, fix test
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 22, 2024
* internal/flags: use filepath.Clean instead of path.Clean

* internal/flags: fix windows pipe issue

* internal/flags: modify test for windows

* internal/flags: use backticks, fix test
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 25, 2024
* internal/flags: use filepath.Clean instead of path.Clean

* internal/flags: fix windows pipe issue

* internal/flags: modify test for windows

* internal/flags: use backticks, fix test
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 25, 2024
* internal/flags: use filepath.Clean instead of path.Clean

* internal/flags: fix windows pipe issue

* internal/flags: modify test for windows

* internal/flags: use backticks, fix test
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Nov 25, 2024
* internal/flags: use filepath.Clean instead of path.Clean

* internal/flags: fix windows pipe issue

* internal/flags: modify test for windows

* internal/flags: use backticks, fix test
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Nov 27, 2024
* internal/flags: use filepath.Clean instead of path.Clean

* internal/flags: fix windows pipe issue

* internal/flags: modify test for windows

* internal/flags: use backticks, fix test
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Nov 27, 2024
* internal/flags: use filepath.Clean instead of path.Clean

* internal/flags: fix windows pipe issue

* internal/flags: modify test for windows

* internal/flags: use backticks, fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows - customFlags should use filepath.Clean() instead of path.Clean()
5 participants