This issue was causing many testcases fail in tct. In case the dir
already existed we should not throw as the method goes recursively
so some dirs might already exist
Change-Id: I6e7b30857e6204ad9d9617e6a49f0222385989dd
Signed-off-by: Wojciech Kosowicz <w.kosowicz@samsung.com>
picojson::value response = picojson::value(picojson::object());
picojson::object& obj = response.get<picojson::object>();
obj["callbackId"] = picojson::value(callback_id);
- PrepareError(e, obj);
+ if (e == FilesystemError::DirectoryExists)
+ ReportSuccess(obj);
+ else
+ PrepareError(e, obj);
PostMessage(response.serialize().c_str());
};
auto onResult = [&](FilesystemError e) {
LoggerD("enter");
- PrepareError(e, out);
+ if (e == FilesystemError::DirectoryExists)
+ ReportSuccess(out);
+ else
+ PrepareError(e, out);
};
FilesystemManager::GetInstance().MakeDirectory(location, onResult);