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

Icon is broken when launched with relative path to parent folder #5402

Closed
ghostoy opened this issue Oct 26, 2016 · 0 comments
Closed

Icon is broken when launched with relative path to parent folder #5402

ghostoy opened this issue Oct 26, 2016 · 0 comments
Assignees
Labels

Comments

@ghostoy
Copy link
Member

ghostoy commented Oct 26, 2016

Assume following directory:

PARENT_DIR
    ┣ APP_ROOT
    │    ┣ icon.png
    │    ┗ package.json
    ┗ NW_ROOT
         ┗ nw

When starting app in NW_ROOT folder by following CLI: nw ../APP_ROOT/. In the app, open a window with icon set to icon.png. The icon for the window is now broken.

@ghostoy ghostoy self-assigned this Oct 26, 2016
ghostoy pushed a commit to ghostoy/nw.js that referenced this issue Oct 26, 2016
When starting apps from a folder of parent, such as `nw ../app_root/`,
icon file cannot be loaded correctly. The root cause is that
`base::ReadFileToString` refused for path referencing to parent
folder. However path of icon obtained by `nw::Package::ConvertToAbsolutePath`
is still a relative path.
The patch fixes `ConvertToAbsolutePath` to return a absolute path.

fixed nwjs#5402
rogerwang pushed a commit that referenced this issue Nov 4, 2016
When starting apps from a folder of parent, such as `nw ../app_root/`,
icon file cannot be loaded correctly. The root cause is that
`base::ReadFileToString` refused for path referencing to parent
folder. However path of icon obtained by `nw::Package::ConvertToAbsolutePath`
is still a relative path.
The patch fixes `ConvertToAbsolutePath` to return a absolute path.

fixed #5402
@ghostoy ghostoy added the bug label Nov 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant