[Solved] GetCurrentDirName replacement.

This forum is for general developer support questions.
Post Reply
AmiDARK
Posts: 40
Joined: Thu Oct 20, 2011 9:23 am

[Solved] GetCurrentDirName replacement.

Post by AmiDARK »

Hello,

As the function is no more available in 53.30, does someone know a method to get the "current directory name" ?

Thank you.
Last edited by AmiDARK on Fri Sep 25, 2015 10:10 am, edited 1 time in total.
Sam440EP - AmigaOS 4.1 Final Edition
User avatar
thomasrapp
Posts: 310
Joined: Sat Jun 18, 2011 11:22 pm

Re: GetCurrentDirName replacement.

Post by thomasrapp »

NameFromLock (GetCurrentDir(),buffer,buffer_size);
AmiDARK
Posts: 40
Joined: Thu Oct 20, 2011 9:23 am

Re: GetCurrentDirName replacement.

Post by AmiDARK »

Thank you thomasrapp.
I was not sure about this function.

Regards,
AmiDARK
Sam440EP - AmigaOS 4.1 Final Edition
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 530
Joined: Sat Jun 18, 2011 3:12 pm
Location: Finland
Contact:

Re: [Solved] GetCurrentDirName replacement.

Post by salass00 »

The GetCurrentDirName() function has just been renamed to GetCliCurrentDirName() (there is a compatibility macro in <dos/obsolete.h> as well) but because there are some problems with this function (see the dos.library autodoc) it is recommended to use GetCurrentDir() and DevNameFromLock() or NameFromLock() instead in new code.
Post Reply