Changeset 655


Ignore:
Timestamp:
May 5, 2007, 8:44:24 AM (19 years ago)
Author:
John Small
Message:
  • The program now changes the current directory to the directory

where the program is located. This eliminates problems with the
relative paths used within the code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/shadowmgr.cmd

    r652 r655  
    1515      end
    1616
    17 curdir = directory()
     17parse source . . thispgm
     18thisdir = left(thispgm, lastpos('\', thispgm) - 1)
     19if length(thisdir) = 2 then
     20   thisdir = thisdir || '\'
     21call directory thisdir
    1822
    1923i = 0
     
    2226Shadow.i.package  = 'FM2'
    2327Shadow.i.folderid = '<FM3_Docs>'
    24 Shadow.i.filename = '.\docs\readme'
     28Shadow.i.filename = '..\docs\readme'
    2529Shadow.i.longname = 'Read Me'
    2630
     
    2832Shadow.i.package  = 'FM2'
    2933Shadow.i.folderid = '<FM3_Docs>'
    30 Shadow.i.filename = '.\docs\copying'
     34Shadow.i.filename = '..\docs\copying'
    3135Shadow.i.longname = 'GNU General Public License'
    3236
     
    3438Shadow.i.package  = 'FM2'
    3539Shadow.i.folderid = '<FM3_Docs>'
    36 Shadow.i.filename = '.\docs\history'
     40Shadow.i.filename = '..\docs\history'
    3741Shadow.i.longname = 'History'
    3842
     
    4044Shadow.i.package  = 'FM2'
    4145Shadow.i.folderid = '<FM3_Docs>'
    42 Shadow.i.filename = '.\docs\customizingresources.txt'
     46Shadow.i.filename = '..\docs\customizingresources.txt'
    4347Shadow.i.longname = 'Customizing^Resources'
    4448
     
    5458   if package_parm = Shadow.i.package then
    5559      do
    56          fullfilename = stream(curdir || '\' || Shadow.i.filename, 'c', 'query exists')
     60         fullfilename = stream(thisdir || '\' || Shadow.i.filename, 'c', 'query exists')
    5761         if fullfilename = '' then
    5862            do
    5963               say 'Unable to find file: 'Shadow.i.filename
    60                say 'curdir: 'curdir
     64               say 'thisdir: 'thisdir
    6165               '@pause'
    6266               exit 1
Note: See TracChangeset for help on using the changeset viewer.