]> granicus.if.org Git - python/commitdiff
Forward port of 1.12.14.3 (which has an incorrect log message):
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 29 Oct 2002 22:48:43 +0000 (22:48 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 29 Oct 2002 22:48:43 +0000 (22:48 +0000)
if SetDates() in touched() returns an error ignore it: the user may not have
permission to change the parent folder. This is a non-serious problem,
the only function of touched() is to speed up the finder seeing the
change.

Mac/Lib/macostools.py

index 5b94ee20dd16ed8268a6e4109db4d7ca4a1fe649..8822ab8f9787ce61ed8377c0719893123bb57bce 100644 (file)
@@ -71,7 +71,10 @@ def touched(dst):
        now = time.time()
        if now == moddate:
                now = now + 1
-       dir_fss.SetDates(crdate, now, bkdate)
+       try:
+               dir_fss.SetDates(crdate, now, bkdate)
+       except macfs.error:
+               pass
        
 def touched_ae(dst):
        """Tell the finder a file has changed"""