Menu

#1759 File saveAs allows file.rg.rg

None
feedback
nobody
None
5
2026-01-14
2026-01-13
musewhirl
No

Occurred using the GTK filemanager in Debian 13 along with QT_QPA_PLATFORMTHEME=gtk3

Steps to reproduce:

  1. Select File/saveAs...
  2. Filemanager filter is set to "Rosegarden files" which is why the old filename displays with no extension
  3. Overwrite the old filename with test.rg
  4. The file is saved as test.rg.rg

True you get what you ask for. But I'm not sure it's standard behavior for applications in this scenario. Is it expected Rosegarden behavior? Perhaps it's something the filemanager just does on hand-off or is RG supposed to recognize that the user means test.rg and save it that way?

Discussion

  • Ted Felix

    Ted Felix - 2026-01-13

    I can't reproduce this. If I ask for test.rg , it saves as test.rg.

    We have code to prevent this in RosegardenMainWindow::launchSaveAsDialog(). It checks for an extension (dot followed by 1-4 chars) and doesn't add one if it's already there. Not sure why it isn't working in your case. I tried several combinations and couldn't reproduce this.

    What are your settings for the following (General > Presentation):

    • Theme
    • Use native file dialogs

    Is there anything that goes along with QT_QPA_PLATFORMTHEME=gtk3 in your setup? E.g. are there theme packages you have installed, or anything else you can think of?

    Honestly, the code is super-simple and shouldn't be affected by anything. We might need to add some logging to help figure this out.

    Code from launchSaveAsDialog() that adds the ".rg" for reference:

    // If we have a filter extension...
    if (!filterExtension.isEmpty()) {
        static QRegularExpression extensionRegEx("\\..{1,4}$");
        // If the file name has no extension, add the filter extension.
        if (!extensionRegEx.match(name).hasMatch())
            name += filterExtension;
    }
    
     
  • musewhirl

    musewhirl - 2026-01-14

    Based on your comment, I went back and cannot reproduce this either...not by the simple route I mentioned. I only have the memory of a file called blah.rg.rg turning up after I was trying to distill down bug #1761 by keeping the bug trapped in a session using SaveAs.

    Chances are this bug is a dud. I'll keep an eye on it for a while to ensure it's not due to some tangled path that I took...seems unlikely from the code you posted though. Ignore this for now.

     
  • Ted Felix

    Ted Felix - 2026-01-14

    My thought was that perhaps you are launching a different file save dialog somehow and that dialog has a bug in it where it doubles the extension. That would indeed be a problem as the check would see the second one and not add another. There would still be two, though.

    Hopefully this was just nothing. I'll switch it to feedback and close after 26.06.

     
  • Ted Felix

    Ted Felix - 2026-01-14
    • status: open --> feedback
     

Log in to post a comment.

MongoDB Logo MongoDB