ellie-commons / sequeler

SQL Client built in Vala
GNU General Public License v3.0
804 stars 66 forks source link

Remove file extension filter from SQLite db setup dialogue #248

Closed riker09 closed 5 years ago

riker09 commented 5 years ago

When creating a new SQLite db connection the selection is limited to *.sqlite files. As mentioned in ticket #94 this limitation will allow *.db and *.sqlite3 files as well, I have not tested this.

Screenshot von 2019-04-09 15 17 04

In the file open dialogue there is a preselected filter Database File that does not allow anything else. I would like to be able to open any file, regardless of its extension. There should be an option "Any extension" or something similar that removes any file extension restrictions.

Alecaddd commented 5 years ago

Which version of Sequeler are you running? The current version allows the selection of all the extensions you mentioned: https://github.com/Alecaddd/sequeler/blob/master/src/Widgets/ConnectionDialog.vala#L234

Allowing the selection of all file types would be a mistake and would cause the implementation of various security and parsing checks, adding unnecessary complexity to the code.

riker09 commented 5 years ago

I guess I'm using the latest version that is available from the AppCenter. There is no info window I can find, how do I determine the version?

Maybe I was not specific enough when describing this issue. I wanted to open a file which I knew was an SQlite database. But the writing program didn't add any of the extension that Sequeler would recognize. Matter of fact, there was no file extension at all. Copying the file and adding the extension myself I was able to open the database.

jameswestman commented 5 years ago

Why not filter.add_mime_type("application/x-sqlite3")?

Teagum commented 4 months ago

The latest version available on Debian, which is 0.8.0, still cannot open other file extensions than .db and .sqlite[3].