You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a link to sass file in my index.html like that
<linkrel="stylesheet" href="scss/index.scss">
On Unix platforms this works when running trunk serve from the crate directory.
However, on Windows I get an error: skipping invalid path: \\?\C:\Users\USERNAME\PATH_TO_WD\frontend\scss/index.scss
It seems that trunk does not properly map the slash to the backslash as a forward slash can be seen in the error message.
It works fine if i replace the slash with a backslash, but that would break unix platforms.
The text was updated successfully, but these errors were encountered:
So, I am currently looking through the source code to see if I might be able to fix that myself.
I think the problem is that in AssetFile::new()fs::canonicalize is used which is the async version from async-std. The docs for the sync version of this says: https://doc.rust-lang.org/std/fs/fn.canonicalize.html
On Windows, this converts the path to use extended length path syntax, which allows your program to use longer path names, but means you can only join backslash-delimited paths to it, and it may be incompatible with other applications (if passed to the application on the command-line, or written to a file another application may read).
I guess this means that either this subsequent if clause is false (what does the "://" pattern stand for?)
if !path.to_string_lossy().contains("://"){
progress.println(format!("{}skipping invalid path: {}", Emoji("︎🚫 ", ""), path.to_string_lossy()));}
or the asset file join logic that is passed to this function is false. Because a normal slash is at one part joined with the rest of the path which results in a invalid Windows path.
I have a link to sass file in my index.html like that
On Unix platforms this works when running
trunk serve
from the crate directory.However, on Windows I get an error:
skipping invalid path: \\?\C:\Users\USERNAME\PATH_TO_WD\frontend\scss/index.scss
It seems that trunk does not properly map the slash to the backslash as a forward slash can be seen in the error message.
It works fine if i replace the slash with a backslash, but that would break unix platforms.
The text was updated successfully, but these errors were encountered: