Skip to content
Snippets Groups Projects
Commit e7243cec authored by Sébastien Blin's avatar Sébastien Blin
Browse files

data_transfer: receive incoming profiles in dedicated directory

this avoid to create a dirty cache

Change-Id: Icde80be0fe241774a1e21eea4558ba76f2559f9f
parent 35d201ee
No related branches found
No related tags found
No related merge requests found
......@@ -609,7 +609,11 @@ IncomingFileTransfer::requestFilename(const std::function<void(const std::string
emit(DRing::DataTransferEventCode::wait_host_acceptance);
if (internalCompletionCb_) {
std::string filename = fileutils::get_cache_dir() + DIR_SEPARATOR_STR + std::to_string(id);
std::string path = fmt::format("{}/{}/profiles",
fileutils::get_cache_dir(),
info_.accountId);
fileutils::recursive_mkdir(path);
auto filename = fmt::format("{}/{}", path, id);
fileutils::ofstream(filename);
if (not fileutils::isFile(filename))
throw std::system_error(errno, std::generic_category());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment