[xiph-cvs] cvs commit: positron/positron util.py
Stan Seibert
volsung at xiph.org
Sat Sep 6 14:23:09 PDT 2003
volsung 03/09/06 17:23:09
Modified: positron util.py
Log:
Preserve atime and mtime of files copied to the Neuros. Makes it nicer
for people using other synchronization programs like rsync. Closes
bug 435.
Revision Changes Path
1.3 +4 -0 positron/positron/util.py
Index: util.py
===================================================================
RCS file: /usr/local/cvsroot/positron/positron/util.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- util.py 8 Jul 2003 02:59:37 -0000 1.2
+++ util.py 6 Sep 2003 21:23:09 -0000 1.3
@@ -16,6 +16,7 @@
import os
from os import path
+from stat import *
def trim_newline(s):
"Returns s without a trailing newline if present."
@@ -48,6 +49,9 @@
src.close()
dest.close()
+ s = os.stat(src_filename)
+ os.utime(dest_filename, (s[ST_ATIME], s[ST_MTIME]))
+
def recursive_delete(pathname):
if path.isfile(pathname):
os.remove(pathname)
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list