-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
embed: embed path on different OS cannot open file #45230
Labels
Comments
From documentation of embed, it clearly says |
filepath.Join will join using backward slash on Windows, path.Join will use forward slash |
Oh, so |
bingoohuang
added a commit
to bingoohuang/httplive
that referenced
this issue
Mar 3, 2022
filepath.Join will join using backward slash on Windows, path.Join will use forward slash golang/go#45230
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
Tested OS
Windows, Linux
What did you do?
This works perfectly okay with Linux as it follows notation of Linux filesystem, but on Windows, even though it can fetch
fs.dirEntry
, it cannot read file with error given;open dir/myfile1.txt: file does not exist
.I can change
embed
notation with double backslash\\
and it will work.So I can make that compile only on Windows, but somehow I think this is bug, because it can anyway fetch meta information of file, just cannot open it.
The text was updated successfully, but these errors were encountered: