Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The app stops if map_files[].src is invalid without error #65

Open
daisukes opened this issue Nov 16, 2022 · 0 comments
Open

The app stops if map_files[].src is invalid without error #65

daisukes opened this issue Nov 16, 2022 · 0 comments

Comments

@daisukes
Copy link
Contributor

daisukes commented Nov 16, 2022

NavCog tries to parse the src string as an URL.
If it is not a valid URL, it will stop while checking download files.

{
   ...
    "map_files":
    [
      {
        "src": "invalid_url:port/path/to/file",
        "size": 1234567
      }
    ],
   ...
}

This returns nil

- (NSURL*) getDestLocation:(NSString*)path {
return [NSURL URLWithString:[NSURL URLWithString:path].lastPathComponent relativeToURL:targetDir];
}

and here causes an exception.

[maps addObject:[self getDestLocation:src].path];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant