/bevy_asset-0.12.1/src/path.rs:104:37: called `Result::unwrap()` on an `Err` value: InvalidSourceSyntax
I tracked down where I think this is being thrown to the while loop that parses paths looking for :. Since there is a second : in the url containing a path, it seems to throw that InvalidSourceSyntax error.
while let Some((index, char)) = chars.next() {
match char {
':' => {
let (_, char) = chars
.next()
.ok_or(ParseAssetPathError::InvalidSourceSyntax)?;
if char != '/' {
return Err(ParseAssetPathError::InvalidSourceSyntax);
}
let (index, char) = chars
.next()
.ok_or(ParseAssetPathError::InvalidSourceSyntax)?;
if char != '/' {
return Err(ParseAssetPathError::InvalidSourceSyntax);
}
source_range = Some(0..index - 2);
path_range.start = index + 1;
}
'#' => {
path_range.end = index;
label_range = Some(index + 1..asset_path.len());
break;
}
_ => {}
}
}
I've been working with this library using an image pulled from S3 as a testing URL.
This image parses in just fine, but I'm running into an asset path parsing error when sending in a url that contains a port.
Ideally, I'd like to use pre-signed urls from S3 and that would look something like this.
The error I'm seeing so far looks like this.
I tracked down where I think this is being thrown to the while loop that parses paths looking for
:
. Since there is a second:
in the url containing a path, it seems to throw thatInvalidSourceSyntax
error.