254 |
if(Path.compare("/") != 0) s += "/"; |
if(Path.compare("/") != 0) s += "/"; |
255 |
int res = sqlite3_step(pStmt); |
int res = sqlite3_step(pStmt); |
256 |
while(res == SQLITE_ROW) { |
while(res == SQLITE_ROW) { |
257 |
pDirectories->push_back(s + ToString(sqlite3_column_text(pStmt, 0))); |
pDirectories->push_back(s + idb->toAbstractName(ToString(sqlite3_column_text(pStmt, 0)))); |
258 |
res = sqlite3_step(pStmt); |
res = sqlite3_step(pStmt); |
259 |
} |
} |
260 |
|
|
339 |
if(Path.compare("/") != 0) s += "/"; |
if(Path.compare("/") != 0) s += "/"; |
340 |
int res = sqlite3_step(pStmt); |
int res = sqlite3_step(pStmt); |
341 |
while(res == SQLITE_ROW) { |
while(res == SQLITE_ROW) { |
342 |
pInstruments->push_back(s + ToString(sqlite3_column_text(pStmt, 0))); |
pInstruments->push_back(s + idb->toAbstractName(ToString(sqlite3_column_text(pStmt, 0)))); |
343 |
res = sqlite3_step(pStmt); |
res = sqlite3_step(pStmt); |
344 |
} |
} |
345 |
|
|
391 |
} |
} |
392 |
|
|
393 |
int dstDirId = db->GetDirectoryId(dir); |
int dstDirId = db->GetDirectoryId(dir); |
394 |
if(dstDirId == -1) throw Exception("Unkown DB directory: " + dir); |
if(dstDirId == -1) { |
395 |
|
throw Exception("Unkown DB directory: " + InstrumentsDb::toEscapedPath(dir)); |
396 |
|
} |
397 |
IntListPtr ids = db->GetInstrumentIDs(DirId); |
IntListPtr ids = db->GetInstrumentIDs(DirId); |
398 |
for (int i = 0; i < ids->size(); i++) { |
for (int i = 0; i < ids->size(); i++) { |
399 |
String name = db->GetInstrumentName(ids->at(i)); |
String name = db->GetInstrumentName(ids->at(i)); |