It is currently Sun Dec 08, 2019 2:17 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [Done] 5.70 GetUserDirectory(#PB_Directory_ProgramData)
PostPosted: Sat Feb 16, 2019 1:16 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Apr 27, 2010 3:20 pm
Posts: 144
Location: Wales, United Kingdom
Code:
GetUserDirectory(#PB_Directory_ProgramData)


I understand that this will return the home directory followed by ''/." in order to prefix a name with a period to make it hidden, and it's a great idea.. however, it returns: "/home/mike/./" with a forward slash after the period, meaning whatever you concatenate it with will not be hidden, it'll just appear as a regular file/directory in the home path.

Eg.

Code:
GetUserDirectory(#PB_Directory_ProgramData) + "myapp/config.cfg"


Expected result: "/home/mike/.myapp/config.cfg"
Actual result: "/home/mike/./myapp/config.cfg"

_________________
Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.70] GetUserDirectory(#PB_Directory_ProgramData) Behav
PostPosted: Sat Feb 16, 2019 1:36 pm 
Offline
Addict
Addict

Joined: Thu Aug 30, 2007 11:54 pm
Posts: 1157
Location: right here
Indeed, that's what the docs say
Quote:
#PB_Directory_ProgramData: program data directory of the current logged user.
On Linux and OSX, it is the home directory followed by '/.' to be able to create
hidden config directory in the home user.
Sounds like a weird idea though, even if it would work.


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.70] GetUserDirectory(#PB_Directory_ProgramData) Behav
PostPosted: Sat Feb 16, 2019 1:39 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Apr 27, 2010 3:20 pm
Posts: 144
Location: Wales, United Kingdom
#NULL wrote:
Indeed, that's what the docs say
Quote:
#PB_Directory_ProgramData: program data directory of the current logged user.
On Linux and OSX, it is the home directory followed by '/.' to be able to create
hidden config directory in the home user.
Sounds like a weird idea though, even if it would work.


Typically it's the case that applications use the home directory to store program data which makes looking in your home directory quite scary when you enable hidden files haha

_________________
Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.70] GetUserDirectory(#PB_Directory_ProgramData) Behav
PostPosted: Mon Feb 18, 2019 8:46 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13643
Location: France
Fixed.


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.70] GetUserDirectory(#PB_Directory_ProgramData) Behav
PostPosted: Tue Feb 19, 2019 5:37 pm 
Offline
User
User

Joined: Thu Sep 06, 2012 9:39 am
Posts: 60
Env wrote:
Typically it's the case that applications use the home directory to store program data which makes looking in your home directory quite scary when you enable hidden files haha

Yeah, so-called "dotfile madness": https://0x46.net/thoughts/2019/02/01/dotfile-madness/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye