mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Moved some code around: occasionally the SetCreatorFileType didn't
work because the finder got there first (at leats, that's what I think happened).
This commit is contained in:
parent
66691ba748
commit
bca57e60c0
1 changed files with 10 additions and 8 deletions
|
@ -164,6 +164,8 @@ def process_common(template, progress, code, rsrcname, destname, is_update):
|
||||||
dest.write(data)
|
dest.write(data)
|
||||||
dest.close()
|
dest.close()
|
||||||
tmpl.close()
|
tmpl.close()
|
||||||
|
del dest
|
||||||
|
del tmpl
|
||||||
|
|
||||||
# Open the output resource fork
|
# Open the output resource fork
|
||||||
|
|
||||||
|
@ -209,14 +211,6 @@ def process_common(template, progress, code, rsrcname, destname, is_update):
|
||||||
if ownertype == None:
|
if ownertype == None:
|
||||||
die("No owner resource found in either resource file or template")
|
die("No owner resource found in either resource file or template")
|
||||||
|
|
||||||
# Now set the creator, type and bundle bit of the destination
|
|
||||||
dest_finfo = dest_fss.GetFInfo()
|
|
||||||
dest_finfo.Creator = ownertype
|
|
||||||
dest_finfo.Type = 'APPL'
|
|
||||||
dest_finfo.Flags = dest_finfo.Flags | MACFS.kHasBundle
|
|
||||||
dest_finfo.Flags = dest_finfo.Flags & ~MACFS.kHasBeenInited
|
|
||||||
dest_fss.SetFInfo(dest_finfo)
|
|
||||||
|
|
||||||
# Make sure we're manipulating the output resource file now
|
# Make sure we're manipulating the output resource file now
|
||||||
|
|
||||||
UseResFile(output)
|
UseResFile(output)
|
||||||
|
@ -253,6 +247,14 @@ def process_common(template, progress, code, rsrcname, destname, is_update):
|
||||||
|
|
||||||
CloseResFile(output)
|
CloseResFile(output)
|
||||||
|
|
||||||
|
# Now set the creator, type and bundle bit of the destination
|
||||||
|
dest_finfo = dest_fss.GetFInfo()
|
||||||
|
dest_finfo.Creator = ownertype
|
||||||
|
dest_finfo.Type = 'APPL'
|
||||||
|
dest_finfo.Flags = dest_finfo.Flags | MACFS.kHasBundle
|
||||||
|
dest_finfo.Flags = dest_finfo.Flags & ~MACFS.kHasBeenInited
|
||||||
|
dest_fss.SetFInfo(dest_finfo)
|
||||||
|
|
||||||
macostools.touched(dest_fss)
|
macostools.touched(dest_fss)
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
progress.label("Done.")
|
progress.label("Done.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue