aboutsummaryrefslogtreecommitdiff
path: root/paludis/util/safe_ifstream.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/util/safe_ifstream.cc')
-rw-r--r--paludis/util/safe_ifstream.cc21
1 files changed, 10 insertions, 11 deletions
diff --git a/paludis/util/safe_ifstream.cc b/paludis/util/safe_ifstream.cc
index 62704ba..dce4eda 100644
--- a/paludis/util/safe_ifstream.cc
+++ b/paludis/util/safe_ifstream.cc
@@ -94,9 +94,16 @@ SafeIFStreamBase::SafeIFStreamBase(const int f) :
{
}
+SafeIFStream::SafeIFStream(const int f) :
+ SafeIFStreamBase(f),
+ std::istream(&buf),
+ _close(false)
+{
+}
+
namespace
{
- int open_fsentry(const FSEntry & e)
+ int open_path(const FSPath & e)
{
Context context("When opening '" + stringify(e) + "' for read:");
@@ -108,15 +115,8 @@ namespace
}
}
-SafeIFStream::SafeIFStream(const int f) :
- SafeIFStreamBase(f),
- std::istream(&buf),
- _close(false)
-{
-}
-
-SafeIFStream::SafeIFStream(const FSEntry & e) :
- SafeIFStreamBase(open_fsentry(e)),
+SafeIFStream::SafeIFStream(const FSPath & e) :
+ SafeIFStreamBase(open_path(e)),
std::istream(&buf),
_close(true)
{
@@ -133,4 +133,3 @@ SafeIFStreamError::SafeIFStreamError(const std::string & s) throw () :
{
}
-