mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Take into account symbolic links
In order to adjust the path of an included file, when deciding whether the document was moved or not, it is not sufficient comparing the paths because the document could have been accessed through a symbolic link.
This commit is contained in:
parent
cf6128caf6
commit
e626184fd0
@ -4949,7 +4949,8 @@ string Buffer::includedFilePath(string const & name, string const & ext) const
|
||||
// old_position already contains a trailing path separator
|
||||
string const absname = isabsolute ? name : d->old_position + name;
|
||||
|
||||
if (d->old_position.empty() || d->old_position == filePath()
|
||||
if (d->old_position.empty()
|
||||
|| equivalent(FileName(d->old_position), FileName(filePath()))
|
||||
|| !FileName(addExtension(absname, ext)).exists())
|
||||
return name;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user