X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/0a8a80e58374771acc225fe1e08ed8e0fe0016cc..e5eebd12b7d7faf31210511dbf15edbda508ffc4:/apt-pkg/contrib/fileutl.cc?ds=sidebyside diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 3d5c4686b..77e846117 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: fileutl.cc,v 1.11 1998/10/22 04:56:47 jgg Exp $ +// $Id: fileutl.cc,v 1.13 1998/10/26 07:11:49 jgg Exp $ /* ###################################################################### File Utilities @@ -29,7 +29,7 @@ // CopyFile - Buffered copy of a file /*{{{*/ // --------------------------------------------------------------------- /* The caller is expected to set things so that failure causes erasure */ -bool CopyFile(FileFd From,FileFd To) +bool CopyFile(FileFd &From,FileFd &To) { if (From.IsOpen() == false || To.IsOpen() == false) return false; @@ -195,8 +195,10 @@ FileFd::FileFd(string FileName,OpenMode Mode, unsigned long Perms) if (iFd < 0) _error->Errno("open","Could not open file %s",FileName.c_str()); else + { this->FileName = FileName; - SetCloseExec(iFd,true); + SetCloseExec(iFd,true); + } } /*}}}*/ // FileFd::~File - Closes the file /*{{{*/