-
Notifications
You must be signed in to change notification settings - Fork 67
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
Paths starting with "//?/" on Windows are local #320
Paths starting with "//?/" on Windows are local #320
Conversation
dd1fe91
to
c358544
Compare
c358544
to
43bf83e
Compare
43bf83e
to
7070f88
Compare
This change makes the Path constructor handle |
Adding it to the device is not the correct thing to do and I'm not sure if it makes sense to save it. |
7070f88
to
5926533
Compare
Rebased PR on 1d9eb47. |
@HannesWell any more concerns or can this be merged? |
5926533
to
eb9d47a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply.
This change makes the Path constructor handle
//?/
, but I wonder shouldn't the//?/
prefix be stored somehow in order to make it available when the file-system is queried eventually?
But adding it to the device is probably not the right thing to do.Adding it to the device is not the correct thing to do and I'm not sure if it makes sense to save it. The main use for it, as far as I know, is to avoid the
MAX_PATH
length limitation. I suppose the JVM is already doing something along these lines internally, as my testing shows that java applications does not have problem of managing deep file trees.
That's right. I tested it and with the standard Java File or Path API one can handle files and directories straight forward without that prefix (unlike for example the explorer). So it does not need to be added. And with JDK22 Java will also strip it off:
https://jdk.java.net/22/release-notes#JDK-8287843
So in general this change is fine, only the test should be slightly adjusted.
bundles/org.eclipse.equinox.common.tests/src/org/eclipse/equinox/common/tests/PathTest.java
Show resolved
Hide resolved
The prefix might be used to support paths longer than MAX_PATH. https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#win32-file-namespaces Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
eb9d47a
to
f08103b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all good now.
Thank you for this contribution.
The prefix might be used to support paths longer than MAX_PATH.
https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#win32-file-namespaces