rudar
06-03-2002, 07:48 PM
I'm trying to write a cross-platform backup script, and am having some trouble with mac classic. I'm on an OS X box, and I mount a shared volume on an OS 9 box. Then I try copying files over from my machine (OS X) to the other (OS 9). I'm using python's shutil.copy, copy2, copystat, etc, but the shell's cp -p gives the same reult, which is that the mtime of the newly copied file (as given by python's os.path.getmtime()) is the current time, rather than the mtime of the file copied. Is this an unsurmountable problem that can only be fixed by upgrading the file sharing machine to OS X? A surmountable problem that can be fixed by losing that nice platform agnosticism and writing separate code depending on the OS (though how would one even test the os running on a computer hosting a shared drive?)? Or something trivial that hasn't yet occurred to me?