-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Platform.resolvedExecutable gives invalid path for network UNC #52309
Comments
It's not clear why we remove To this untrained PM eye, it seems dangerous to be editing paths like this by hand if at all possible. |
I've tried reproducing this in dart on Windows, but things seem to work as expected:
|
OK, I'll trade you for a broken one :) import 'dart:io';
main() {
print(Platform.executable);
print(Platform.resolvedExecutable);
}
the former is a valid file path; the latter is not. (This is a machine named |
Ah, I see, thanks. |
See fluttercommunity/plus_plugins#1483 (comment) for more information.
In
Platform::ResolveExecutablePath
, if Windows returns a UNC such as\\?\UNC\server\share\folder\file.exe
from GetModuleFileNameW, this will become stripped toUNC\server\share\folder\file.exe
, which is not a valid Windows file path.I believe this is due to some incorrect URL editing here:
sdk/runtime/bin/file_win.cc
Lines 1060 to 1065 in 6e18b08
Documentation on valid file path formats on Windows can be found here:
https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats
/cc @bkonyi @aam
The text was updated successfully, but these errors were encountered: