mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Expand tilde meaning in front of a path name.
This allows to address data in the current lyx-system-directory. The additional prefix is '~:s/' The original prefix '~/' still addresses current users home directory.
This commit is contained in:
parent
e730234e57
commit
ed8dfa3fa0
@ -110,9 +110,16 @@ struct FileName::Private
|
||||
static
|
||||
string const handleTildeName(string const & name)
|
||||
{
|
||||
return name == "~" ? Package::get_home_dir().absFileName() :
|
||||
prefixIs(name, "~/") ? Package::get_home_dir().absFileName() + name.substr(1) :
|
||||
name;
|
||||
string resname;
|
||||
if ( name == "~" )
|
||||
resname = Package::get_home_dir().absFileName();
|
||||
else if ( prefixIs(name, "~/"))
|
||||
resname = Package::get_home_dir().absFileName() + name.substr(1);
|
||||
else if ( prefixIs(name, "~:s/"))
|
||||
resname = package().system_support().absFileName() + name.substr(3);
|
||||
else
|
||||
resname = name;
|
||||
return resname;
|
||||
}
|
||||
|
||||
/// The absolute file name in UTF-8 encoding.
|
||||
|
Loading…
Reference in New Issue
Block a user