From: Stephan Witt Date: Wed, 3 Jun 2015 20:08:21 +0000 (+0200) Subject: #7896 add support for symlink creation by the LyX binary itself X-Git-Tag: 2.2.0alpha1~497 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=bfc7c4d3792b1c4e6d0617d9da177e2df4aa7262;p=features.git #7896 add support for symlink creation by the LyX binary itself --- diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp index 729287d6f2..9506666d27 100644 --- a/src/support/FileName.cpp +++ b/src/support/FileName.cpp @@ -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; diff --git a/src/support/FileName.h b/src/support/FileName.h index f0d1b54748..cfa0c653e6 100644 --- a/src/support/FileName.h +++ b/src/support/FileName.h @@ -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