Importing a file causes "working folder" to change
Paul Timms
11-2-18
I have written HAL routines to import data from another system into Standard ERP. In single user mode on Windows, once I've imported a file, the "working folder" for Standard ERP changes to the folder containing the imported file. This folder suddenly contains hansa.log and uptime.tmp. If I recompile HAL, hal.hob is also created in this folder, and the client reverts to a non-customised version.


The only way to fix this is to restart the client. Is this a bug or is there something that can be added to the HAL to stop this happening?
Giuseppe L.
11-2-18
Hi Paul,
it would be better if you give us more details, such as how the routine works and which is the "other system".
Which is the fold hierarchy.
It looks like that you import the source folder as system path.
I asked to our programmer to come up with some hints.
Please stay tuned.

Giuseppe
HansaWorld Italy
Paul Timms
11-6-18
Hi Guiseppe

The data is being imported from tab-delimited text files. I open my custom import routine from Database Maintenance > Imports, then select the text file to import. If that text file is not in the Standard ERP folder, it uses the folder containing the text file to store the hansa.log, hal.hob, and uptime.tmp.

Paul
Giuseppe L.
11-22-18
Hello Paul,
I tried to repeat the manually what your routine I guess it does and I wasn't able to experience the behaviour you described.
I can only guess the reason is the custom HAL
Sorry for not being more helpful.

Giuseppe
HansaWorld Italy
Aldevinas Katkus
11-27-18
Am I right that hansa.log is saved into some random directory instead of the .exe directory after the import?
Paul Timms
11-29-18
Nearly - but it's not a random directory, it's the directory containing the file which was imported.
Paul Timms
12-19-18
I have also experienced this when importing a standard Hansa import file, using System > Imports > Manual File Search. This would indicate it is not a HAL issue at all.
Swati D.
12-24-19
Hi Paul

I will get someone to repeat and report it

Thanks


Swati
Aldevinas Katkus
1-22-21
I noticed that hansa.log was created in the directory where I uploaded (or downloading - don't remember) a file to the paperclip.
Version was some 8,5.
Aldevinas Katkus
5-4-21
Today we have noticed the same with 8.5 2021-02-13 (build 85360175).
Windows 10 client, Linux server.
User was attaching an external document to the NL transaction paperclip via Operations menu of the paperclip. File attached successfully, but in the original location of that attached file hansa.log file has been created with a few rows of content.
Aldevinas Katkus
4-4-22
Same is with saving an attachment file: hansa.log is created in the folder where we store the attached file.
Version: 8.5 2022-03-04 HansaMail (build 85421524)
Aldevinas Katkus
11-29-22
Same with 2022-10-22 version.
My guess somewhere a wrong function is used to get the exe directory: https://stackoverflow.com/questions/43709657/how-to-get-root-directory-of-project-in-asp-net-core-directory-getcurrentdirect
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Back to the list
Latest Posts
Hi, Thank you for the question! Default value if blank is no max limit for web users nor web sessions. Recommendation depends on server performance that you are running your Standard ERP envir...
07:59 22 Apr 2024
Hi, Thank you for reaching out! What error do you get in server log and client log when you run the report? Please check that you have Multi Thread activated in Systems>>Settings>>O...
09:10 15 Apr 2024