mirror of https://github.com/aria2/aria2
Allow block device file to -i option
parent
bebd602ba7
commit
14e995d2bc
|
@ -529,8 +529,10 @@ std::shared_ptr<UriListParser> openUriListParser(const std::string& filename)
|
||||||
listPath = DEV_STDIN;
|
listPath = DEV_STDIN;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!File(filename).isFile()) {
|
auto f = File(filename);
|
||||||
throw DL_ABORT_EX(fmt(EX_FILE_OPEN, filename.c_str(), "No such file"));
|
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;
|
listPath = filename;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue