mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	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).
This commit is contained in:
		
							parent
							
								
									0e2f798301
								
							
						
					
					
						commit
						a7f4ded436
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -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); | ||||
| 		} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jack Jansen
						Jack Jansen