git » abk » commit 9c13bd8

Update atime/mtime.

author
2005-03-02 05:24:30 UTC
committer
2005-03-02 05:24:30 UTC
parent 98ef221691acc4f461a1715ed923980f7ec46cbf

Update atime/mtime.

abk +3 -1

diff --git a/abk b/abk
index e1febb7..96483a8 100644
--- a/abk
+++ b/abk
@@ -25,11 +25,11 @@ class file_info:
 	"Represents a file"
 	def __init__(self, name):
 		self.name = name
-		self.mtime = 0
 		self.mode = 0
 		self.uid = 0
 		self.gid = 0
 		self.mtime = 0
+		self.atime = 0
 		self.size = 0
 		self.type = ''
 		self.linkto = None
@@ -63,6 +63,7 @@ class file_info:
 			self.type = 'u'
 
 		self.mtime = s.st_mtime
+		self.atime = s.st_atime
 		self.size = s.st_size
 		self.mode = s.st_mode
 		self.uid = s.st_uid
@@ -111,6 +112,7 @@ class file_info:
 
 		os.chmod(dst, self.mode & 07777)	# FIXME: is this linux-only?
 		os.chown(dst, self.uid, self.gid)
+		os.utime(dst, (self.atime, self.mtime))
 
 
 	def copy_file_link(self, dst):