Changeset 229 for trunk/SRC/Utilities


Ignore:
Timestamp:
03/16/07 15:13:14 (17 years ago)
Author:
smasson
Message:

bugfix in path usage (continuation)

Location:
trunk/SRC/Utilities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Utilities/createfunc.pro

    r224 r229  
    6969                       , 'return, res' $ 
    7070                       , 'end'] 
    71 ; go in dirname directory 
    72    cd, dirname, current = old_dir 
     71; is dirname in !path? 
     72   cd, current = here 
     73   pathlist = [here, strsplit(!path, path_sep(/search_path),/extract)] 
     74   inpath = total((file_search(dirname))[0] EQ pathlist) 
     75   IF inpath EQ 0 THEN !path = !path + path_sep(/search_path) + inpath 
     76; update the list of .pro and .sav in !PATH 
     77   path_cache, /rebuild 
    7378; compile it 
    7479   resolve_routine, shortfilename, /is_function 
    75    cd, old_dir 
    7680; execute it 
    7781   res = call_function(shortfilename, _EXTRA = ex) 
  • trunk/SRC/Utilities/createpro.pro

    r227 r229  
    7979   putfile, filename, ['pro ' + shortfilename + kwdlist $ 
    8080                       , 'compile_opt idl2, hidden, strictarrsubs', command, 'return', 'end'] 
     81; is dirname in !path? 
     82   cd, current = here 
     83   pathlist = [here, strsplit(!path, path_sep(/search_path),/extract)] 
     84   inpath = total((file_search(dirname))[0] EQ pathlist) 
     85   IF inpath EQ 0 THEN !path = !path + path_sep(/search_path) + inpath 
    8186; update the list of .pro and .sav in !PATH 
    8287   path_cache, /rebuild 
Note: See TracChangeset for help on using the changeset viewer.