Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-3208

Fix: Linux save file not adding file extension to saved tracks or sessions

    Details

      Description

      Both saving a track, saving a session, and exporting weblinks can occur where the file is saved without a file extension.

      When attempting to save a track IGB shows an error:
      "Problem saving file. More information about what went wrong may be available in the Console. To get help, visit the IGB Help Page."

      Attempting to save a session automatically suggests a file name including a file extension. But if the user submits a name without a user-typed file extension the file does not save properly.

      for both, a file extension is chosen in the file chooser but it is not being applied to the file upon saving.

      Saving images and exporting bookmarks works normally.
      This problem does not occur on 9.1.8.
      Tested on Linux Ubuntu 20: 9.1.10 and 9.1.8

        Attachments

          Issue Links

            Activity

            Show
            rweidenh Logan Weidenhammer (Inactive) added a comment - Spreadsheet comparing file saving behaviors on Linux: https://docs.google.com/spreadsheets/d/19_eLW93H4qYc9VRrVntCEenA60vvI5bWgLeGeHm9KoQ/edit?usp=sharing
            Show
            nfreese Nowlan Freese added a comment - Commit: https://bitbucket.org/nfreese/nowlanfork-igb/commits/5a6b960cea07b59789c85c0c4507d7efc4fb8754
            Show
            nfreese Nowlan Freese added a comment - Pull request: https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/918/igbf-3208-fix-linux-save-file-extensions
            Hide
            ann.loraine Ann Loraine added a comment - - edited
            • Merged. Installers are building.
            • Installers built.
            • Notarized master.dmg (Apple installer) with:
            xcrun altool --notarize-app --primary-bundle-id "2022-11-03-igb-9.1.10" -u [redacted] --asc-provider [redacted] -p [redacted] --file master.dmg
            xcrun stapler staple master.dmg
            
            • Updated notarized master.dmg to team repository Downloads section
            Show
            ann.loraine Ann Loraine added a comment - - edited Merged. Installers are building. Installers built. Notarized master.dmg (Apple installer) with: xcrun altool --notarize-app --primary-bundle-id "2022-11-03-igb-9.1.10" -u [redacted] --asc-provider [redacted] -p [redacted] --file master.dmg xcrun stapler staple master.dmg Updated notarized master.dmg to team repository Downloads section
            Hide
            nfreese Nowlan Freese added a comment -

            The issue is due to the JavaFX FileChooser not adding the extensions to the file in the same way that Windows and Mac native filechoosers do. From what I can tell from various blog posts this behavior is consistent and not due to the FileChooser being implemented incorrectly. Therefore, I have used logic that was present in BookmarkManagerView.java and added it to WebLinksView.java, SaveSessionAction.java, and AbstractExportFileAction.java that looks to see if the extension is present in the save file path, and if not, the extension is added. This corrects the issue where the extension was not appearing on Linux. Note that I did not apply the same logic to ExportDialog.java as the image FileChooser has some different and additional logic.

            Show
            nfreese Nowlan Freese added a comment - The issue is due to the JavaFX FileChooser not adding the extensions to the file in the same way that Windows and Mac native filechoosers do. From what I can tell from various blog posts this behavior is consistent and not due to the FileChooser being implemented incorrectly. Therefore, I have used logic that was present in BookmarkManagerView.java and added it to WebLinksView.java, SaveSessionAction.java, and AbstractExportFileAction.java that looks to see if the extension is present in the save file path, and if not, the extension is added. This corrects the issue where the extension was not appearing on Linux. Note that I did not apply the same logic to ExportDialog.java as the image FileChooser has some different and additional logic.

              People

              • Assignee:
                nfreese Nowlan Freese
                Reporter:
                rweidenh Logan Weidenhammer (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: