AntaresSimulatorTeam / Antares_Simulator

Antares-Simulator is an Open Source power system simulator to quantify the adequacy or the economic performance of interconnected energy systems, at short or remote time horizons.
https://antares-simulator.org
Other
59 stars 24 forks source link

Unable to save study on Ubuntu #479

Closed hugo-antoine-rtei closed 2 years ago

hugo-antoine-rtei commented 2 years ago

Description When trying to save a study (new or loaded), I get a window saying:

Impossible to save the study at this location Please choose another folder to save the study.

I get this message regardless of the folder I put it in (at /home/user it doesn't work either). I also tried using sudo before launching antares.

How to Reproduce

Expected behavior A saved study

Screenshots and additional files Screenshot of the window I get: Capture d’écran du 2021-12-08 18-57-40

OS and version

Additional context When building antares from scratch, saving a study works fine.

flomnes commented 2 years ago

See src/ui/simulator/windows/saveas.cpp

        String pathCopy = path;
        pathCopy.toLower();

        if (pathCopy.startsWith(rootFolder))
        {
            Window::Message message(&mainFrm,
                                    wxT("Save As"),
                                    wxT("Impossible to save the study at this location"),
                                    wxString()
                                      << wxT("Please choose another folder to save the study."));
            message.add(Window::Message::btnCancel);
            message.showModal();
            return;
        }

The problem seems to be that pathCopy.startsWith(rootFolder) is evaluated to true.

flomnes commented 2 years ago

Duplicate of #598

Closed by #600