summaryrefslogtreecommitdiff
path: root/ftparchive/multicompress.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ftparchive/multicompress.cc')
-rw-r--r--ftparchive/multicompress.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/ftparchive/multicompress.cc b/ftparchive/multicompress.cc
index 265fb1a80..1555d2f2d 100644
--- a/ftparchive/multicompress.cc
+++ b/ftparchive/multicompress.cc
@@ -24,6 +24,7 @@
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/time.h>
#include <unistd.h>
#include <iostream>
@@ -237,7 +238,7 @@ bool MultiCompress::Finalize(unsigned long long &OutSize)
if (UpdateMTime > 0 &&
(Now - St.st_mtime > (signed)UpdateMTime || St.st_mtime > Now))
{
- utimensat(AT_FDCWD, I->Output.c_str(), NULL, AT_SYMLINK_NOFOLLOW);
+ utimes(I->Output.c_str(), NULL);
Changed = true;
}
}
@@ -365,7 +366,7 @@ bool MultiCompress::Child(int const &FD)
for (Files *I = Outputs; I != 0; I = I->Next)
{
// Set the correct file modes
- fchmod(I->TmpFile.Fd(),Permissions);
+ chmod(I->TmpFile.Name().c_str(),Permissions);
if (rename(I->TmpFile.Name().c_str(),I->Output.c_str()) != 0)
_error->Errno("rename",_("Failed to rename %s to %s"),