diff --git a/siccc.org b/siccc.org
index f5423e5..efb1799 100644
--- a/siccc.org
+++ b/siccc.org
@@ -12,3 +12,4 @@
* TODO Upload (_unknown)
- file richitig speichern (Siccobject construktor)
+* TODO [Routerin] create directories if they won't exists
diff --git a/src/DynamicObjects.cc b/src/DynamicObjects.cc
index 581e6d4..326bc7f 100644
--- a/src/DynamicObjects.cc
+++ b/src/DynamicObjects.cc
@@ -10,7 +10,7 @@ std::string DynamicObjects::render_object_list(){
for (auto& it : this->m_thevec){
output += u8"
\n";
- output += u8"get_baseurl() + it.get_filepath() + u8"\">"; //we could include baseurl here?
+ output += u8"get_baseurl() + it.get_filepath() + it.get_filename() + u8"\">"; //we could include baseurl here?
output += it.get_filename();
output += u8" ";
output += it.get_pretty_sized();
diff --git a/src/sicccPersister.H b/src/sicccPersister.H
index 7d1e750..3514ad6 100644
--- a/src/sicccPersister.H
+++ b/src/sicccPersister.H
@@ -109,15 +109,18 @@ class SicccPersister
DIR *dir = nullptr;
struct dirent *entry = nullptr;
std::vector v;
+ std::string json_path = merouter.get_json_path();
json_error_t *error = nullptr;
- if ((dir = opendir(merouter.get_json_path().c_str())) == NULL) {
+ std::cout << "[DEBUG] in reading sicccdir" << std::endl;
+ if ((dir = opendir(json_path.c_str())) == NULL) {
std::cerr << "Error could not open directory" << std::endl;
return v; // should throw exception instea1d
}
while ((entry = readdir(dir)) != NULL) {
if (std::strstr(entry->d_name, ".json") == NULL)
continue;
- json_t *tmp = json_load_file(entry->d_name, JSON_DECODE_ANY, error);
+ std::cout << entry->d_name << std::endl;
+ json_t *tmp = json_load_file((json_path + std::string(entry->d_name)).c_str(), JSON_DECODE_ANY, error);
assert(tmp);
Sicccobject so(tmp);
v.push_back(so);