Kaydet (Commit) a7f4ded4 authored tarafından Jack Jansen's avatar Jack Jansen

Allow the script to have not only a TEXT filetype but also a null filetype (to…

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).
üst 0e2f7983
...@@ -549,6 +549,7 @@ PyMac_InitApplication(void) ...@@ -549,6 +549,7 @@ PyMac_InitApplication(void)
{ {
int argc; int argc;
char **argv; char **argv;
OSType filetype;
static char scriptpath[1024]; static char scriptpath[1024];
char *script = NULL; char *script = NULL;
...@@ -573,7 +574,8 @@ PyMac_InitApplication(void) ...@@ -573,7 +574,8 @@ PyMac_InitApplication(void)
chdir(curwd); chdir(curwd);
} }
/* Check that the first argument is a text file */ /* 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); Alert(NOTASCRIPT_ID, NULL);
exit(0); exit(0);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment