Skip to content

Commit

Permalink
[macOS] URL decode resource path #67
Browse files Browse the repository at this point in the history
  • Loading branch information
micheldebree committed Oct 4, 2020
1 parent ebb5f96 commit 8b6f32b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ binaries](https://github.com/Chordian/sidfactory2/workflows/Build%20macOS%20bina

## Changelog

#### Editor

- `macOS` Fixed crash when run from a path with spaces
[#67](https://github.com/Chordian/sidfactory2/issues/67)


### Build 20200911

#### Editor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ namespace Foundation

if (appUrlRef != nullptr)
{
CFStringRef filePathRef = CFURLCopyPath(appUrlRef);
CFStringRef filePathRef = CFURLCopyFileSystemPath(appUrlRef, kCFURLPOSIXPathStyle);
const char* filePath = CFStringGetCStringPtr(filePathRef, kCFStringEncodingUTF8);
return std::string(filePath);
return std::string(filePath) + '/';
}

return std::string();
Expand Down

0 comments on commit 8b6f32b

Please sign in to comment.