/[svn]/linuxsampler/trunk/src/db/InstrumentsDb.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/db/InstrumentsDb.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1353 by iliev, Mon Sep 17 23:15:25 2007 UTC revision 1364 by schoenebeck, Mon Oct 1 13:38:37 2007 UTC
# Line 127  namespace LinuxSampler { Line 127  namespace LinuxSampler {
127      sqlite3* InstrumentsDb::GetDb() {      sqlite3* InstrumentsDb::GetDb() {
128          if ( db != NULL) return db;          if ( db != NULL) return db;
129    
130          if (DbFile.empty()) DbFile = "/var/lib/linuxsampler/instruments.db";          if (DbFile.empty()) DbFile = CONFIG_DEFAULT_INSTRUMENTS_DB_LOCATION;
131          int rc = sqlite3_open(DbFile.c_str(), &db);          int rc = sqlite3_open(DbFile.c_str(), &db);
132          if (rc) {          if (rc) {
133              sqlite3_close(db);              sqlite3_close(db);
# Line 1630  namespace LinuxSampler { Line 1630  namespace LinuxSampler {
1630              db = NULL;              db = NULL;
1631          }          }
1632    
1633          if (DbFile.empty()) DbFile = "/var/lib/linuxsampler/instruments.db";          if (DbFile.empty()) DbFile = CONFIG_DEFAULT_INSTRUMENTS_DB_LOCATION;
1634          String bkp = DbFile + ".bkp";          String bkp = DbFile + ".bkp";
1635          remove(bkp.c_str());          remove(bkp.c_str());
1636          if (rename(DbFile.c_str(), bkp.c_str()) && errno != ENOENT) {          if (rename(DbFile.c_str(), bkp.c_str()) && errno != ENOENT) {

Legend:
Removed from v.1353  
changed lines
  Added in v.1364

  ViewVC Help
Powered by ViewVC