Commit 41f356c5 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

Folder: Fix folder files listing

parent f338cee0
......@@ -10,5 +10,6 @@ public:
virtual ~IFolder() = default;
virtual unsigned int id() const = 0;
virtual const std::string& path() = 0;
// This will only returns the files in this immediate folder
virtual std::vector<FilePtr> files() = 0;
};
......@@ -65,7 +65,7 @@ const std::string& Folder::path()
std::vector<FilePtr> Folder::files()
{
static const std::string req = "SELECT f.* FROM " + policy::FileTable::Name +
" WHERE f.id_folder = ?";
static const std::string req = "SELECT * FROM " + policy::FileTable::Name +
" WHERE folder_id = ?";
return SqliteTools::fetchAll<File, IFile>( m_dbConection, req, m_id );
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment