Commit 7d6737c6 authored by Nicolas Jager's avatar Nicolas Jager

internal : add function to erase cache folder

Change-Id: Ib4f409bd0cacad2694593477ad49c804a18fb0ed
Tuleap: #1229
parent 93dbe9e9
......@@ -233,9 +233,28 @@ void RingClientUWP::RingD::askToExportOnRing(String ^ accountId, String ^ passwo
tasksList_.push(task);
}
void RingClientUWP::RingD::eraseCacheFolder()
{
StorageFolder^ localFolder = ApplicationData::Current->LocalFolder;
String^ folderName = ".cache";
task<IStorageItem^>(localFolder->TryGetItemAsync(folderName)).then([this](IStorageItem^ folder)
{
if (folder) {
MSG_("erasing cache folder.");
folder->DeleteAsync();
}
else {
WNG_("cache folder not found.");
}
});
}
void
RingClientUWP::RingD::startDaemon()
{
eraseCacheFolder();
create_task([&]()
{
using SharedCallback = std::shared_ptr<DRing::CallbackWrapperBase>;
......
......@@ -94,6 +94,7 @@ internal:
void unPauseCall(String ^ callId);
void askToRefreshKnownDevices(String^ accountId);
void askToExportOnRing(String^ accountId, String^ password);
void eraseCacheFolder();
/* TODO : move members */
///bool hasConfig; // replaced by startingStatus
......
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