mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Fix gcc warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35294 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cb40d51906
commit
ef3c8c10e1
@ -741,9 +741,9 @@ docstring const makeDisplayPath(string const & path, unsigned int threshold)
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_READLINK
|
||||
bool readLink(FileName const & file, FileName & link)
|
||||
{
|
||||
#ifdef HAVE_READLINK
|
||||
char linkbuffer[PATH_MAX + 1];
|
||||
string const encoded = file.toFilesystemEncoding();
|
||||
int const nRead = ::readlink(encoded.c_str(),
|
||||
@ -753,10 +753,13 @@ bool readLink(FileName const & file, FileName & link)
|
||||
linkbuffer[nRead] = '\0'; // terminator
|
||||
link = makeAbsPath(linkbuffer, onlyPath(file.absFileName()));
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
bool readLink(FileName const &, FileName &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
cmd_ret const runCommand(string const & cmd)
|
||||
|
Loading…
Reference in New Issue
Block a user