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
While working on #59998, I noticed that the import system fails on files with either " or \n (the \ and n characters, not an actual newline) in their names.
Those are actually two different bugs with slightly different symptoms, but they're both related to not properly escaping characters for paths so I'm reporting them together.
Path with \n
With a file named ic\non.png, I get this spam of errors:
Testing with a file named ic"on.png.
This actually imports fine, but then the imported file can't be loaded because the .import file has a truncated path:
ERROR: Resource file not found: res://.godot/imported/ic.
at: _load (core/io/resource_loader.cpp:210)
ERROR: Failed loading resource: res://ic"on.png. Make sure resources have been imported by opening the project in the editor at least once.
at: _load (core/io/resource_loader.cpp:205)
Indeed, the ic"on.png.import file (which can be written and read fine, no path problem here) has:
Godot version
4.0.dev (5a912b0)
System information
Linux, Mageia 9 x86_64
Issue description
While working on #59998, I noticed that the import system fails on files with either
"
or\n
(the\
andn
characters, not an actual newline) in their names.Those are actually two different bugs with slightly different symptoms, but they're both related to not properly escaping characters for paths so I'm reporting them together.
Path with
\n
With a file named
ic\non.png
, I get this spam of errors:Ad lib.
Path with
"
Testing with a file named
ic"on.png
.This actually imports fine, but then the imported file can't be loaded because the
.import
file has a truncated path:Indeed, the
ic"on.png.import
file (which can be written and read fine, no path problem here) has:The
dest_files
is correctly escaped, but thepath
field is not, so it gets truncated when parsing.Steps to reproduce
icon.png
toic\non.png
to see the first issueicon.png
toic"on.png
to see the second issueMinimal reproduction project
TestImportPathBugs.zip
The text was updated successfully, but these errors were encountered: