18 |
|
_H<dbi::ResultSet> path_(connection->Parse(_B("SELECT path FROM folders WHERE path = ?"))->Execute(path.GetPath())); |
19 |
|
|
20 |
|
if (!path_->MoveNext()) |
21 |
< |
connection->Parse(_B("INSERT INTO folders (path, folder, root) VALUES (?, ?, ?)"))->Execute(path.GetPath(), path.GetParent().GetPath(), root.GetPath()); |
21 |
> |
if (path.GetPath() != root.GetPath()) |
22 |
> |
connection->Parse(_B("INSERT INTO folders (path, folder, root) VALUES (?, ?, ?)"))->Execute(path.GetPath(), path.GetParent().GetPath(), root.GetPath()); |
23 |
> |
else |
24 |
> |
connection->Parse(_B("INSERT INTO folders (path, folder, root) VALUES (?, NULL, ?)"))->Execute(path.GetPath(), root.GetPath()); |
25 |
|
} |
26 |
|
|
27 |
|
_L<MediaFile> MediaFolder::GetFiles() const |