]> git.lyx.org Git - lyx.git/commitdiff
#7896 add support for symlink creation by the LyX binary itself
authorStephan Witt <switt@lyx.org>
Wed, 3 Jun 2015 20:08:21 +0000 (22:08 +0200)
committerStephan Witt <switt@lyx.org>
Tue, 23 Jun 2015 06:41:43 +0000 (08:41 +0200)
src/support/FileName.cpp
src/support/FileName.h

index 729287d6f29be2047bc01a11da53d9a27be12991..9506666d27fc0de2dfbfe26b440db50904d9354d 100644 (file)
@@ -490,6 +490,12 @@ bool FileName::chdir() const
 }
 
 
+bool FileName::link(FileName const & name) const
+{
+       return QFile::link(toqstr(absFileName()), toqstr(name.absFileName()));
+}
+
+
 unsigned long checksum_ifstream_fallback(char const * file)
 {
        unsigned long result = 0;
index f0d1b54748089290e20de80d149f0bc774769da6..cfa0c653e605854bb2604241eb1cb5b455f1280c 100644 (file)
@@ -143,6 +143,7 @@ public:
        /// the symlink will be destroyed).
        /// \return true on success.
        bool moveTo(FileName const & target) const;
+       bool link(FileName const & name) const;
 
        /// change mode of pointed file.
        /// This methods does nothing and return true on platforms that does not