[libgda] SQLite: better handle .db file extension
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] SQLite: better handle .db file extension
- Date: Sun, 28 Aug 2011 19:43:55 +0000 (UTC)
commit 8b6ea1ec34f45383e7035d7f8748e45dc716d2dd
Author: Vivien Malerba <malerba gnome-db org>
Date: Sun Aug 28 21:40:28 2011 +0200
SQLite: better handle .db file extension
libgda/sqlite/gda-sqlite-provider.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/libgda/sqlite/gda-sqlite-provider.c b/libgda/sqlite/gda-sqlite-provider.c
index 10872d0..7b7b7de 100644
--- a/libgda/sqlite/gda-sqlite-provider.c
+++ b/libgda/sqlite/gda-sqlite-provider.c
@@ -819,15 +819,14 @@ gda_sqlite_provider_open_connection (GdaServerProvider *provider, GdaConnection
return FALSE;
}
- /* try first without the file extension */
- filename = g_build_filename (dirname, dbname, NULL);
+ /* try first with the file extension */
+ gchar *tmp;
+ tmp = g_strdup_printf ("%s%s", dbname, FILE_EXTENSION);
+ filename = g_build_filename (dirname, tmp, NULL);
+ g_free (tmp);
if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
- gchar *tmp;
g_free (filename);
- tmp = g_strdup_printf ("%s%s", dbname, FILE_EXTENSION);
- filename = g_build_filename (dirname, tmp, NULL);
- g_free (tmp);
-
+ filename = g_build_filename (dirname, dbname, NULL);
}
g_free (dup);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]