mirror of
https://github.com/python/cpython.git
synced 2025-09-14 04:37:29 +00:00
Added macostools.touch() calls to inform the finder of our changes.
This commit is contained in:
parent
57d53a90d9
commit
29a3355ab9
3 changed files with 6 additions and 0 deletions
|
@ -19,6 +19,7 @@ import macfs
|
||||||
import MACFS
|
import MACFS
|
||||||
import MacOS
|
import MacOS
|
||||||
from Res import *
|
from Res import *
|
||||||
|
import macostools
|
||||||
|
|
||||||
# .pyc file (and 'PYC ' resource magic number)
|
# .pyc file (and 'PYC ' resource magic number)
|
||||||
MAGIC = imp.get_magic()
|
MAGIC = imp.get_magic()
|
||||||
|
@ -212,6 +213,7 @@ def process(template, filename, output):
|
||||||
|
|
||||||
CloseResFile(output)
|
CloseResFile(output)
|
||||||
|
|
||||||
|
macostools.touched(dest_fss)
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
print "Applet created:", destname
|
print "Applet created:", destname
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
import os
|
import os
|
||||||
import macfs
|
import macfs
|
||||||
import sys
|
import sys
|
||||||
|
import macostools
|
||||||
|
|
||||||
OLD='PYTH'
|
OLD='PYTH'
|
||||||
NEW='Pyth'
|
NEW='Pyth'
|
||||||
|
@ -15,6 +16,7 @@ def walktree(name, change):
|
||||||
cur_cr, cur_tp = fs.GetCreatorType()
|
cur_cr, cur_tp = fs.GetCreatorType()
|
||||||
if cur_cr == OLD:
|
if cur_cr == OLD:
|
||||||
fs.SetCreatorType(NEW, cur_tp)
|
fs.SetCreatorType(NEW, cur_tp)
|
||||||
|
macostools.touched(fs)
|
||||||
print 'Fixed ', name
|
print 'Fixed ', name
|
||||||
elif os.path.isdir(name):
|
elif os.path.isdir(name):
|
||||||
print '->', name
|
print '->', name
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
import os
|
import os
|
||||||
import macfs
|
import macfs
|
||||||
import sys
|
import sys
|
||||||
|
import macostools
|
||||||
|
|
||||||
list = [
|
list = [
|
||||||
('.py', 'Pyth', 'TEXT'),
|
('.py', 'Pyth', 'TEXT'),
|
||||||
|
@ -33,6 +34,7 @@ def walktree(name, change):
|
||||||
if curcrtp <> (cr, tp):
|
if curcrtp <> (cr, tp):
|
||||||
if change:
|
if change:
|
||||||
fs.SetCreatorType(cr, tp)
|
fs.SetCreatorType(cr, tp)
|
||||||
|
macostools.touched(fs)
|
||||||
print 'Fixed ', name
|
print 'Fixed ', name
|
||||||
else:
|
else:
|
||||||
print 'Wrong', curcrtp, name
|
print 'Wrong', curcrtp, name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue