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
OK, I really don't expect rust-embed to implement this, and it's probably not a good idea, but it would make my life easier way out on this edge case. :)
Here's the bug I'm running into: NfNitLoop/feoblog#16 (which is not rust-embed's fault!)
In short: Something is generating file paths that have : in them. On Windows, this ends up creating a thing called an NTFS alternate data stream. So for example, the file:
C:\foo\bar:baz
Is actually a zero-byte file called C:\foo\bar, which has an alternate data stream associated with it called baz. This all sort of works in development mode in rust-embed. If I ask rust-embed for a file called "bar:baz", it (seems that it?) asks NTFS to open that file path, and it serves the data as expected.
BUT, when I build for production, bar is included as a 0-byte file, but :baz is not. This is unsurprising. It's not a file. It's an additional "stream".
Please feel free to close. I mostly just wanted to communicate a weird/unexpected edge case on Windows. :)
The text was updated successfully, but these errors were encountered:
Well, it's unsurprising now, now that I know what's going on. I should say -- it was very surprising when it happened to me. I didn't know about NTFS data streams. I didn't know why things worked in dev. mode and not production mode. At first I thought it was a rust-embed bug.
That is a weird edge case. Either way, I'm not sure how rust-embed could support embedding NTFS streams in the binary, so I'll close this. Technically would could probably detect the case (if platform is windows and path contains a colon) but it's probably not that worthwhile. Thanks for noting it, as I'm sure someone in the future may run into a similar issue.
OK, I really don't expect rust-embed to implement this, and it's probably not a good idea, but it would make my life easier way out on this edge case. :)
Here's the bug I'm running into: NfNitLoop/feoblog#16 (which is not rust-embed's fault!)
In short: Something is generating file paths that have
:
in them. On Windows, this ends up creating a thing called an NTFS alternate data stream. So for example, the file:Is actually a zero-byte file called
C:\foo\bar
, which has an alternate data stream associated with it calledbaz
. This all sort of works in development mode in rust-embed. If I ask rust-embed for a file called "bar:baz", it (seems that it?) asks NTFS to open that file path, and it serves the data as expected.BUT, when I build for production,
bar
is included as a 0-byte file, but:baz
is not. This is unsurprising. It's not a file. It's an additional "stream".Please feel free to close. I mostly just wanted to communicate a weird/unexpected edge case on Windows. :)
The text was updated successfully, but these errors were encountered: