InputStream: add static method OpenReady()

Merge some duplicate code.
This commit is contained in:
Max Kellermann
2013-12-29 18:08:49 +01:00
parent ea9aff1d3f
commit aeb2baa495
11 changed files with 47 additions and 62 deletions

View File

@@ -62,9 +62,9 @@ public:
/* open the InputStream (if not already open) */
if (is == nullptr) {
is = InputStream::Open(path_fs.c_str(),
mutex, cond,
IgnoreError());
is = InputStream::OpenReady(path_fs.c_str(),
mutex, cond,
IgnoreError());
if (is == nullptr)
return false;
} else