Mercurial > cpython-lru_cache-weakref
diff Mac/Python/macmain.c @ 23511:7bc31ad9477c legacy-trunk
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).
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Wed, 22 May 2002 15:02:08 +0000 |
| parents | 8291473fde3e |
| children | 0bb3986cf653 |
line wrap: on
line diff
--- a/Mac/Python/macmain.c Wed May 22 14:31:48 2002 +0000 +++ b/Mac/Python/macmain.c Wed May 22 15:02:08 2002 +0000 @@ -549,6 +549,7 @@ { int argc; char **argv; + OSType filetype; static char scriptpath[1024]; char *script = NULL; @@ -573,7 +574,8 @@ 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); }
