{"action":"opened","issue":{"url":"https://api.github.com/repos/imagej/imagej-legacy/issues/101","labels_url":"https://api.github.com/repos/imagej/imagej-legacy/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/imagej/imagej-legacy/issues/101/comments","events_url":"https://api.github.com/repos/imagej/imagej-legacy/issues/101/events","html_url":"https://github.com/imagej/imagej-legacy/issues/101","id":55059754,"number":101,"title":"LegacyUI chooseFile has extension problems when saving","user":{"login":"hinerm","id":1123809,"avatar_url":"https://avatars.githubusercontent.com/u/1123809?v=3","gravatar_id":"","url":"https://api.github.com/users/hinerm","html_url":"https://github.com/hinerm","followers_url":"https://api.github.com/users/hinerm/followers","following_url":"https://api.github.com/users/hinerm/following{/other_user}","gists_url":"https://api.github.com/users/hinerm/gists{/gist_id}","starred_url":"https://api.github.com/users/hinerm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hinerm/subscriptions","organizations_url":"https://api.github.com/users/hinerm/orgs","repos_url":"https://api.github.com/users/hinerm/repos","events_url":"https://api.github.com/users/hinerm/events{/privacy}","received_events_url":"https://api.github.com/users/hinerm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/imagej/imagej-legacy/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-21T18:45:37Z","updated_at":"2015-01-21T18:45:37Z","closed_at":null,"body":"If the `JFileChooser` is enabled, saving - e.g. via `File > Export > Image...` - works fine: what you see as a file name and extension is what you get.\r\n\r\nIf `JFileChooser` is disabled however, strange things happen.\r\n\r\nFor example, the `.ome.tif` extension gets converted to `.ometif`. This makes it impossible to save a `.ome.tif` as an `.ome.tif`.\r\n\r\nA partial fix is to pass `null` as the extension to the ImageJ 1.x `SaveDialog`. This works OK when the `JFileChooser` is disabled - although you then have to manually type in the extension.\r\n\r\nBut when a `null` extension is passed with the `JFileChooser` enabled, even if an extension is specified, it gets truncated (e.g. `.ome.tif` gets saved as `.ome`).\r\n\r\nBest solution I can think of is to check if `JFileChooser` is enabled and pass the extension, or `null` if it's not."}}