]> git.pld-linux.org Git - packages/extundelete.git/blob - extundelete-attrs.patch
- fix building with recent e2fsprogs
[packages/extundelete.git] / extundelete-attrs.patch
1 --- extundelete-0.2.4/src/extundelete.cc.orig   2014-12-24 14:00:40.401233636 +0100
2 +++ extundelete-0.2.4/src/extundelete.cc        2014-12-24 14:41:00.240755859 +0100
3 @@ -89,6 +89,7 @@ Important future enhancements:
4  #include <fcntl.h>
5  #include <unistd.h>
6  #include <utime.h>
7 +#include <sys/time.h>
8  
9  /* GNU headers */
10  #ifndef HAVE_GETOPT_H
11 @@ -1746,8 +1746,14 @@ errcode_t restore_inode(ext2_filsys fs,
12                                 }
13                                 tsize = fsize - rsize;
14                                 if ((retval = truncate( (outputdir + fname2).c_str(), tsize)) == 0) {
15 +                                       struct timeval times[2];
16 +                                       chmod((outputdir + fname2).c_str(),inode->i_mode);
17 +                                       lchown((outputdir + fname2).c_str(),inode->i_uid,inode->i_gid);
18 +                                       times[0].tv_sec=inode->i_atime; times[0].tv_usec=0;
19 +                                       times[1].tv_sec=inode->i_mtime; times[1].tv_usec=0;
20 +                                       utimes((outputdir + fname2).c_str(),times);
21                                         Log::info << "Restored inode " << ino << " to file "
22 -                                       << (outputdir + fname2) << std::endl;
23 +                                       << (outputdir + fname2) << " deleted " << asctime(localtime((time_t*)&inode->i_dtime)) << std::endl;
24                                         retval = 0;
25                                 } else {
26                                         Log::warn << "Failed to restore inode " << ino << " to file "
This page took 0.130767 seconds and 3 git commands to generate.