Current Working Directory Bug (I believe)

General chat about HostMonitor (all messages posted before March 07, 2003 available here).
Locked
jricha34
Posts: 59
Joined: Sun Jul 07, 2002 6:00 pm
Location: USA

Post by jricha34 »

I found something interesting...

I set up an Import folder under my main BIN folder for Host Monitor so I could keep my host import files separate.

Well when I did that all of my tests which depend one external scripts failed...

My structure looks like

E:.
---Monitor
+---Instances
| +---AddonTests
| ---Main
| +---Examples
| +---Imports
| +---Logs
| ---Orig
---Scripts


I did that because Host Monitor doesn't remember my imports folder and I would rather drill down one then drill up and then back down... Hint, that would be a nice mod, remember my folders...

Anyway, once I did that my external scripts which are fired with relative paths pointing back to addontests (i.e. perl ..addonteststestname.pl) broke and the return code in HM was 2 which is can't find file.

So I started a test for external program with a SW_SHOWNORMAL and set the test to be cmd /k which simply opens a command prompt for me... Low and behold when I imported from imports the Current Working Directory (CWD) I was opened to was the imports folder. When I didn't do an import it was the main BIN folder (main in this case).

I would expect that it should maintain the BIN folder as the current working directory folder. My guess is that during the import process you change the folder and never revert back after the import.

Alternatively you could add an option for external tests and this is probably a good idea of Current Working Directory.

thanks, joe


KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I think problem fixed. There is update http://www.ks-soft.net/download/hm334.zip

Regards
Alex
Locked