From bfc7c4d3792b1c4e6d0617d9da177e2df4aa7262 Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Wed, 3 Jun 2015 22:08:21 +0200 Subject: [PATCH] #7896 add support for symlink creation by the LyX binary itself --- src/support/FileName.cpp | 6 ++++++ src/support/FileName.h | 1 + 2 files changed, 7 insertions(+) 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