Merge "[Download] Synchronously checking access to file" into tizen
authorPiotr Kosko <p.kosko@samsung.com>
Wed, 25 Apr 2018 12:29:45 +0000 (12:29 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Wed, 25 Apr 2018 12:29:46 +0000 (12:29 +0000)
1  2 
src/download/download_instance.cc

@@@ -571,9 -483,14 +571,14 @@@ void DownloadInstance::DownloadManagerS
      }
    }
  
+   CHECK_STORAGE_ACCESS(diPtr->destination.empty()
+                            ? common::FilesystemProvider::Create().GetRealPath("downloads")
+                            : diPtr->destination,
+                        &out);
    if (!args.get("fileName").is<picojson::null>()) {
      if (args.get("fileName").is<std::string>() && args.get("fileName").get<std::string>() != "") {
 -      diPtr->file_name = args.get("fileName").get<std::string>();
 +      di_ptr->file_name = args.get("fileName").get<std::string>();
      }
    }