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 { |
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) |