>Hi everybody,
>
>I'm using relative paths in the development. I have code that changes the current directory and then all my relative paths don't work anymore.
>
>Is there a method to fix the probem (still use the relative paths, but allow changing of the main directory)?
If you're setting your paths at startup, convert them to absolute at that point... like this:
Do addpath With 'libs'
Do addpath With 'frx'
Do addpath With 'forms'
Do addpath With 'tools'
Do addpath With 'stuff'
...
Proc addpath
Lparam cPath
Try
cPath=FullPath(Addbs(cPath))
If Directory(cPath)
If Atc(cPath+',', Set('path')+',')=0
cPath=Set('path')+','+cPath
Set Path To (cPath)
Endif
Endif
Catch To oEx
Assert .F. Message oEx.Message
Endtry