Georg Baum wrote:
> Am Mittwoch, 1. November 2006 17:27 schrieb Leuven, E.:
>>> I use the 'onlyFilename' function to set the tab name so
>> yeah, i saw that...
>>
>>> I wonder why you see the full path?
>>> Is this function is broken?
>> it looks for a forward slash
>>
>> string::size_type j = fname.rfind('/');
>>
>> whereas dirs are separated here with backward slashes...
>
> Not inside LyX. All filenames inside LyX must have forward slashes (this is
> assumed in many places), therefore all filenames coming from external
> sources must go through lyx::support::os::internal_path(). Clearly such a
> call is missing somewhere.
>
>
> Georg
>
>
Maybe here:
Index: buffer.C
===================================================================
--- buffer.C (revision 15674)
+++ buffer.C (working copy)
@@ -373,7 +373,7 @@
void Buffer::setFileName(string const & newfile)
{
- pimpl_->filename = makeAbsPath(newfile);
+ pimpl_->filename = makeAbsPath(support::os::internal_path(newfile));
params().filepath = onlyPath(pimpl_->filename);
setReadonly(fs::is_readonly(pimpl_->filename));
updateTitles();
Or more up in the calling tree?
--
Peter Kümmel