summaryrefslogtreecommitdiffstats
path: root/Mac/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Python')
-rw-r--r--Mac/Python/macsetfiletype.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/Mac/Python/macsetfiletype.c b/Mac/Python/macsetfiletype.c
index cb2d822..c4b114f 100644
--- a/Mac/Python/macsetfiletype.c
+++ b/Mac/Python/macsetfiletype.c
@@ -42,14 +42,17 @@ char *name;
long creator, type;
{
FInfo info;
+ FSSpec fss;
unsigned char *pname;
pname = (StringPtr) Pstring(name);
- if ( GetFInfo(pname, 0, &info) < 0 )
+ if (FSMakeFSSpec(0, 0, pname, &fss) < 0 )
+ return -1;
+ if ( FSpGetFInfo(&fss, &info) < 0 )
return -1;
info.fdType = type;
info.fdCreator = creator;
- return SetFInfo(pname, 0, &info);
+ return FSpSetFInfo(&fss, &info);
}
long
@@ -58,9 +61,12 @@ char *name;
{
FInfo info;
unsigned char *pname;
+ FSSpec fss;
pname = (StringPtr) Pstring(name);
- if ( GetFInfo(pname, 0, &info) < 0 )
+ if (FSMakeFSSpec(0, 0, pname, &fss) < 0 )
+ return -1;
+ if ( FSpGetFInfo(&fss, &info) < 0 )
return -1;
return info.fdType;
}