/[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 1911 by senoner, Sat Jun 6 13:50:36 2009 UTC revision 1912 by senoner, Sat Jun 6 16:48:00 2009 UTC
# Line 30  Line 30 
30  #include <errno.h>  #include <errno.h>
31  #ifndef WIN32  #ifndef WIN32
32  #include <fnmatch.h>  #include <fnmatch.h>
33    #else
34    #include <direct.h>
35  #endif  #endif
   
36  #include "../common/Exception.h"  #include "../common/Exception.h"
37    
38  namespace LinuxSampler {  namespace LinuxSampler {
# Line 127  namespace LinuxSampler { Line 128  namespace LinuxSampler {
128                          #else                          #else
129                          char *userprofile = getenv("USERPROFILE");                          char *userprofile = getenv("USERPROFILE");
130                          if(userprofile) {                          if(userprofile) {
131                              DbFile = userprofile;                              String DbPath = userprofile;
132                                  DbFile += "\\.linuxsampler\\instruments.db";                                  DbPath += "\\.linuxsampler";
133                                DbFile = DbPath + "\\instruments.db";
134                                    File InstrumentsDbFile(DbFile);
135                                    // if no DB exists create the subdir and then the DB
136                                    if( !InstrumentsDbFile.Exist() ) {
137                                        _mkdir( DbPath.c_str() );
138                                            // formats the DB, which creates a new instruments.db file
139                                            Format();
140                                    }
141                      }                      }
142                          else {                          else {
143                              // in case USERPROFILE is not set (which should not occur)                              // in case USERPROFILE is not set (which should not occur)

Legend:
Removed from v.1911  
changed lines
  Added in v.1912

  ViewVC Help
Powered by ViewVC