Changeset 3070

Show
Ignore:
Timestamp:
12/21/05 00:13:08 (3 years ago)
Author:
timothy
Message:

Adding code back that I shouldn't have deleted. Got confused with the ruby version.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Plug-Ins/Python Support/JVPythonChatPlugin.m

    r3069 r3070  
    151151        NSFileManager *fm = [NSFileManager defaultManager]; 
    152152        NSString *path = [self scriptFilePath]; 
     153 
     154        // if we didn't originally load with a human editable file path,  
     155        // try to find the human editable version and check it for changes  
     156        if( ! [[path pathExtension] isEqualToString:@"py"] ) { 
     157                path = [[self scriptFilePath] stringByDeletingPathExtension]; 
     158                path = [path stringByAppendingPathExtension:@"py"]; 
     159                if( ! [fm fileExistsAtPath:path] ) path = [self scriptFilePath]; 
     160        } 
    153161 
    154162        if( [fm fileExistsAtPath:path] ) {