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:
11 @@ -1746,8 +1746,14 @@ errcode_t restore_inode(ext2_filsys fs,
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;
26 Log::warn << "Failed to restore inode " << ino << " to file "