]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
* src/frontends/qt4/QTocDialog.C (updateGui):
[lyx.git] / src / buffer.C
index 0e7944a17679fdc4efa4b75ebf8a803c88347575..f4e64964cae3d84022be6a811d6c7d58fee500cf 100644 (file)
@@ -102,7 +102,6 @@ using support::createBufferTmpDir;
 using support::destroyDir;
 using support::FileName;
 using support::getFormatFromContents;
-using support::isDirWriteable;
 using support::libFileSearch;
 using support::latex_path;
 using support::ltrim;
@@ -142,7 +141,7 @@ using std::string;
 
 namespace {
 
-int const LYX_FORMAT = 255;
+int const LYX_FORMAT = 256;
 
 } // namespace anon
 
@@ -389,9 +388,8 @@ void Buffer::setReadonly(bool const flag)
 
 void Buffer::setFileName(string const & newfile)
 {
-       string const filename = makeAbsPath(newfile);
-       pimpl_->filename = FileName(filename);
-       params().filepath = onlyPath(filename);
+       pimpl_->filename = makeAbsPath(newfile);
+       params().filepath = onlyPath(pimpl_->filename.absFilename());
        setReadonly(fs::is_readonly(pimpl_->filename.toFilesystemEncoding()));
        updateTitles();
 }