From d0a0645836e2221148200d2da0ae9166f59f6bc3 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 26 Nov 2016 22:16:18 +0900 Subject: [PATCH] We already replaced "-" with DEV_STDIN in LocalFilePathOptionHandler --- src/download_helper.cc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/download_helper.cc b/src/download_helper.cc index 6de3d12e3..9a19fe2fb 100644 --- a/src/download_helper.cc +++ b/src/download_helper.cc @@ -525,17 +525,14 @@ bool createRequestGroupFromUriListParser( std::shared_ptr openUriListParser(const std::string& filename) { std::string listPath; - if (filename == "-") { - listPath = DEV_STDIN; - } - else { - auto f = File(filename); - if (!f.exists() || f.isDir()) { - throw DL_ABORT_EX(fmt(EX_FILE_OPEN, filename.c_str(), - "File not found or it is a directory")); - } - listPath = filename; + + auto f = File(filename); + if (!f.exists() || f.isDir()) { + throw DL_ABORT_EX(fmt(EX_FILE_OPEN, filename.c_str(), + "File not found or it is a directory")); } + listPath = filename; + return std::make_shared(listPath); }