From 38e032e6b82691ef73ecbbe9023aa6b0986a926a Mon Sep 17 00:00:00 2001 From: Szymon Jastrzebski Date: Fri, 26 Jan 2018 15:44:52 +0100 Subject: [PATCH] [Download] Synchronously checking access to file [Verification] TCT Download equal to 100% Change-Id: Icf1a4d3c3b1bc54aa9b3b67bf2286ba9913ab021 Signed-off-by: Szymon Jastrzebski --- src/download/download_instance.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/download/download_instance.cc b/src/download/download_instance.cc index 52923da8..b3d67783 100644 --- a/src/download/download_instance.cc +++ b/src/download/download_instance.cc @@ -483,6 +483,11 @@ void DownloadInstance::DownloadManagerStart(const picojson::value& args, picojso } } + CHECK_STORAGE_ACCESS(diPtr->destination.empty() + ? common::FilesystemProvider::Create().GetRealPath("downloads") + : diPtr->destination, + &out); + if (!args.get("fileName").is()) { if (args.get("fileName").is() && args.get("fileName").get() != "") { diPtr->file_name = args.get("fileName").get(); -- 2.34.1