|
|
Home » Developing U++ » U++ Developers corner » Things we want from Linux/FreeBSD release archives
Re: Things we want from Linux/FreeBSD release archives [message #53477 is a reply to message #53475] |
Sun, 05 April 2020 13:07 |
|
mirek
Messages: 13976 Registered: November 2005
|
Ultimate Member |
|
|
amrein wrote on Sun, 05 April 2020 11:46Hi
I don't understand why we use ~/.config and ~/.cache and not directories in the current source directory when U++ is inside user home directory.
I mean, the main idea of sandboxing is to keep everything in the same directory, right?
You have missed the description of the process. It is quite more complicated then just using ~/.config / ~.cache.
String ConfigFile(const char *file) {
if(sConfigFolder.GetCount())
return AppendFileName(sConfigFolder, file);
#if defined(PLATFORM_WIN32)
if(sHomecfg) {
String p = GetHomeDirFile(GetAppName());
ONCELOCK
RealizeDirectory(p);
return AppendFileName(p, file);
}
return GetExeDirFile(file);
#elif defined(PLATFORM_POSIX)
static String cfgdir;
ONCELOCK {
String h = GetExeFolder();
if(!sHomecfg)
while(h.GetCount() > 1 && DirectoryExists(h)) {
String pp = AppendFileName(h, ".config");
FindFile ff(pp);
if(ff && ff.IsFolder() && ff.CanWrite()) {
cfgdir = pp;
break;
}
h = GetFileFolder(h);
}
if(IsNull(cfgdir))
cfgdir = GetEnv("XDG_CONFIG_HOME");
if(IsNull(cfgdir) || !DirectoryExists(cfgdir))
cfgdir = GetHomeDirFile(".config");
if(sConfigGroup.GetCount())
cfgdir = AppendFileName(cfgdir, sConfigGroup);
}
String pp = AppendFileName(cfgdir, GetAppName());
RealizeDirectory(pp);
return AppendFileName(pp, file);
#else
NEVER();
return GetExeDirFile(file);
#endif//PLATFORM
}
|
|
|
|
|
Things we want from Linux/FreeBSD release archives
By: mirek on Tue, 31 March 2020 17:52
|
|
|
Re: Things we want from Linux/FreeBSD release archives
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Tue, 31 March 2020 23:24
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Wed, 01 April 2020 06:30
|
|
|
Re: Things we want from Linux/FreeBSD release archives
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Wed, 01 April 2020 11:07
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Wed, 01 April 2020 18:17
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Wed, 01 April 2020 18:21
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Wed, 01 April 2020 18:26
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Wed, 01 April 2020 18:34
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Wed, 01 April 2020 18:54
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Thu, 02 April 2020 19:10
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Thu, 02 April 2020 19:33
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Thu, 02 April 2020 20:45
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Fri, 03 April 2020 00:32
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Fri, 03 April 2020 01:36
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Fri, 03 April 2020 09:23
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Fri, 03 April 2020 20:57
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Sat, 04 April 2020 15:08
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Sat, 04 April 2020 15:33
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Sat, 04 April 2020 18:46
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Zbych on Sat, 04 April 2020 21:06
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Sun, 05 April 2020 00:49
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Zbych on Sun, 05 April 2020 11:12
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Sun, 05 April 2020 13:03
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Sun, 05 April 2020 13:10
|
|
|
Re: Things we want from Linux/FreeBSD release archives
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Mon, 06 April 2020 06:33
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Mon, 06 April 2020 10:12
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Mon, 06 April 2020 15:31
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Tue, 07 April 2020 05:34
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Fri, 10 April 2020 17:34
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Fri, 10 April 2020 18:02
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Fri, 10 April 2020 18:06
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Fri, 10 April 2020 18:37
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Fri, 10 April 2020 19:16
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Tue, 07 April 2020 14:36
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: Novo on Tue, 07 April 2020 15:48
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Tue, 07 April 2020 16:28
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: amrein on Sun, 05 April 2020 11:46
|
|
|
Re: Things we want from Linux/FreeBSD release archives
By: mirek on Sun, 05 April 2020 13:07
|
Goto Forum:
Current Time: Thu May 09 21:05:29 CEST 2024
Total time taken to generate the page: 0.01557 seconds
|
|
|