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

Windows filepaths break the "open images" script? #10

Open
emmastanford opened this issue Jan 22, 2018 · 0 comments
Open

Windows filepaths break the "open images" script? #10

emmastanford opened this issue Jan 22, 2018 · 0 comments

Comments

@emmastanford
Copy link

emmastanford commented Jan 22, 2018

Using the win32-x64 binary on Windows 10, I get an error when I try to open local images:

Uncaught SyntaxError: Unexpected token U in JSON at position 87
    at JSON.parse (<anonymous>)
    at Object.parseRecursion [as parse] (C:\Users\me\Downloads\Mirador Desktop-win32-x64\resources\app.asar\…:182)
    at EventEmitter.ipc.on (index.js:144)
    at emitMany (events.js:127)
    at EventEmitter.emit (events.js:201)

This links to VM260:3 in the debugger, which shows a problem with this line in the generated manifest:

"@id": "file:///C:\Users\me\Downloads\Mirador Desktop-win32-x64\Mirador Desktop-win32-x64\resources\app.asar/986c437c-8b67-4a6b-baa0-50ae71d30b30/manifest.json",

...which leads me to think it's because the app is concatenating forward slashes on top of Windows backslashes in the json filepath, which seems to be set at

const manifestUri = urljoin('file://', __dirname, manifestId, 'manifest.json');
. I don't know if this is really the problem though.

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