summaryrefslogtreecommitdiffstats
path: root/Mac/Lib/macostools.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Lib/macostools.py')
-rw-r--r--Mac/Lib/macostools.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/Mac/Lib/macostools.py b/Mac/Lib/macostools.py
index 72f2032..43ab74f 100644
--- a/Mac/Lib/macostools.py
+++ b/Mac/Lib/macostools.py
@@ -34,9 +34,13 @@ def mkalias(src, dst, relative=None):
alias = srcfss.NewAlias(relativefss)
else:
alias = srcfss.NewAlias()
- srcfinfo = srcfss.GetFInfo()
-
- Res.FSpCreateResFile(dstfss, srcfinfo.Creator, srcfinfo.Type, -1)
+
+ if os.path.isdir(src):
+ cr, tp = 'MACS', 'fdrp'
+ else:
+ cr, tp = srcfss.GetCreatorType()
+
+ Res.FSpCreateResFile(dstfss, cr, tp, -1)
h = Res.FSpOpenResFile(dstfss, 3)
resource = Res.Resource(alias.data)
resource.AddResource('alis', 0, '')