diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-05-22 15:02:08 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-05-22 15:02:08 (GMT) |
commit | a7f4ded436d4ed65ceb51000af27cb725c320659 (patch) | |
tree | 7a8af572b62f035bc156f03d4237ff9bfe8e0aae /Mac/Python/macmain.c | |
parent | 0e2f79830173ccd00bc113a42d951c139deca040 (diff) | |
download | cpython-a7f4ded436d4ed65ceb51000af27cb725c320659.zip cpython-a7f4ded436d4ed65ceb51000af27cb725c320659.tar.gz cpython-a7f4ded436d4ed65ceb51000af27cb725c320659.tar.bz2 |
Allow the script to have not only a TEXT filetype but also a null filetype (to enable files to be created from the Unix side of OSX to be droppable on the MacPython interpreter).
Diffstat (limited to 'Mac/Python/macmain.c')
-rw-r--r-- | Mac/Python/macmain.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Mac/Python/macmain.c b/Mac/Python/macmain.c index a4f7dc4..c703cdc 100644 --- a/Mac/Python/macmain.c +++ b/Mac/Python/macmain.c @@ -549,6 +549,7 @@ PyMac_InitApplication(void) { int argc; char **argv; + OSType filetype; static char scriptpath[1024]; char *script = NULL; @@ -573,7 +574,8 @@ PyMac_InitApplication(void) chdir(curwd); } /* Check that the first argument is a text file */ - if ( PyMac_getfiletype(argv[1]) != 'TEXT' ) { + filetype = PyMac_getfiletype(argv[1]); + if ( filetype != 'TEXT' && filetype != 0 ) { Alert(NOTASCRIPT_ID, NULL); exit(0); } |