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

GNU/Linux: `dialog.showOpenDialog()` changing result extensions based on filters #6305

Closed
jviotti opened this Issue Jun 30, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@jviotti
Member

jviotti commented Jun 30, 2016

I'm encountering a very weird issue, only in GNU/Linux.

Consider the following gist that shows an open dialog and presents the resulting filename in the screen: https://gist.github.com/jviotti/b8358165f1694228fbc31e400dbadab6, which you can run by npm install && npm start.

Now create a file with a .img.gz extension, like foo.img.gz. Using the touch command is enough.

Try to select it using the gist application. The .img.gz extension is replaced by .zip (or whatever is the first item of the extensions filter) for some strange reason.

The issue only seems reproducible with files containing multiple extensions, and when a dialog filter is present.

  • Electron version: 1.2.5
  • Operating system: GNU/Linux (Ubuntu 14.04 and Arch Linux)
@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Jul 1, 2016

I can reproduce with Ubuntu 14.04.

@jviotti

This comment has been minimized.

Member

jviotti commented Jul 1, 2016

@zcbenz Do you have an idea on what is causing this? Since you put the "beginner" tag on it, I'd love to give it a shot myself.

@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Jul 1, 2016

I'll create a pull request, it is quicker than explain it.

@jviotti

This comment has been minimized.

Member

jviotti commented Jul 1, 2016

Awesome, thanks a lot for the quick fix!

jviotti pushed a commit to balena-io/etcher that referenced this issue Jul 7, 2016

Juan Cruz Viotti
upgrade(GUI): electron to v1.2.6
This version contains a GNU/Linux fix there the image extension was
changed by the dialog.

Change-Type: patch
Changelog-Entry: Fix `ENOENT` error when selecting certain images with multiple extensions on GNU/Linux.
See: electron/electron#6305
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

jviotti pushed a commit to balena-io/etcher that referenced this issue Jul 7, 2016

Juan Cruz Viotti
upgrade(GUI): electron to v1.2.6 (#561)
This version contains a GNU/Linux fix there the image extension was
changed by the dialog.

Change-Type: patch
Changelog-Entry: Fix `ENOENT` error when selecting certain images with multiple extensions on GNU/Linux.
See: electron/electron#6305
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment