From: Jack Jansen Date: Tue, 29 Oct 2002 22:48:43 +0000 (+0000) Subject: Forward port of 1.12.14.3 (which has an incorrect log message): X-Git-Tag: v2.3c1~3655 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37e477216beb70d100a9d4ca670158d33f77cd96;p=thirdparty%2FPython%2Fcpython.git Forward port of 1.12.14.3 (which has an incorrect log message): 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. --- diff --git a/Mac/Lib/macostools.py b/Mac/Lib/macostools.py index 5b94ee20dd16..8822ab8f9787 100644 --- a/Mac/Lib/macostools.py +++ b/Mac/Lib/macostools.py @@ -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"""