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
// check in real file system
for _, file := range files {
_, err := os.Open(file)
if err != nil {
fmt.Println("[FAILED ] failed open", file, "in real file system:", err)
} else {
fmt.Println("[SUCCESS] open", file, "in real file system")
}
}
// check in embedded
for _, file := range files {
_, err := assets.Open(file)
if err != nil {
fmt.Println("[FAILED ] failed open", file, "in embedded file system", ":", err)
} else {
fmt.Println("[SUCCESS] open", file, "in embedded file system")
}
}
}
What did you expect to see?
Embedded files with : in names were included.
(from demo)
[SUCCESS] open assets/root.txt in real file system
[SUCCESS] open assets/:normal in real file system
[SUCCESS] open assets/:alsonormal/file2.txt in real file system
[SUCCESS] open assets/root.txt in embedded file system
[SUCCESS] open assets/:normal in embedded file system
[SUCCESS] open assets/:alsonormal/file2.txt in embedded file system
What did you see instead?
Embedded files with : in names were not included.
(from demo)
[SUCCESS] open assets/root.txt in real file system
[SUCCESS] open assets/:normal in real file system
[SUCCESS] open assets/:alsonormal/file2.txt in real file system
[SUCCESS] open assets/root.txt in embedded file system
[FAILED ] failed open assets/:normal in embedded file system : open assets/:normal: file does not exist
[FAILED ] failed open assets/:alsonormal/file2.txt in embedded file system : open assets/:alsonormal/file2.txt: file does not exist
Analysis
Likely related to #45447.
Embedded files names restriction should be relaxed and/or documented.
The text was updated successfully, but these errors were encountered:
reddec
changed the title
embed: Files starting with [ (squared brackets) or with : (double dots) are not embedded (undocumented behavior)
embed: Files starting with : (double dots) are not embedded (undocumented behavior)
May 17, 2021
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
demo-fs.tar.gz
Source code (see attachment)
What did you expect to see?
Embedded files with
:
in names were included.(from demo)
What did you see instead?
Embedded files with
:
in names were not included.(from demo)
Analysis
Likely related to #45447.
Embedded files names restriction should be relaxed and/or documented.
The text was updated successfully, but these errors were encountered: