summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac/ic.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-02-05 15:49:19 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-02-05 15:49:19 (GMT)
commitcf0b2e8e28680dcf35d73ff9e4ba6719ca8e7cd8 (patch)
tree2a70e05f6b2e1dd912431575b873766ee4b932e0 /Lib/plat-mac/ic.py
parentd66071b48dbcfaeabe498babcad2b5f4e1c17c4b (diff)
downloadcpython-cf0b2e8e28680dcf35d73ff9e4ba6719ca8e7cd8.zip
cpython-cf0b2e8e28680dcf35d73ff9e4ba6719ca8e7cd8.tar.gz
cpython-cf0b2e8e28680dcf35d73ff9e4ba6719ca8e7cd8.tar.bz2
Getting rid of macfs and FSSpecs.
Diffstat (limited to 'Lib/plat-mac/ic.py')
-rw-r--r--Lib/plat-mac/ic.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/Lib/plat-mac/ic.py b/Lib/plat-mac/ic.py
index 3c0272c..ff3c571 100644
--- a/Lib/plat-mac/ic.py
+++ b/Lib/plat-mac/ic.py
@@ -3,7 +3,9 @@
import icglue
import string
import sys
+import os
from Carbon import Res
+import Carbon.File
import macfs
import macostools
@@ -216,13 +218,9 @@ class IC:
return self.ic.ICMapTypeCreator(type, creator, filename)
def settypecreator(self, file):
- if type(file) == type(''):
- fss = macfs.FSSpec(file)
- else:
- fss = file
- name = fss.as_tuple()[2]
- record = self.mapfile(name)
- fss.SetCreatorType(record[2], record[1])
+ file = Carbon.File.pathname(file)
+ record = self.mapfile(os.path.split(file)[1])
+ MacOS.SetCreatorAndType(file, record[2], record[1])
macostools.touched(fss)
# Convenience routines