summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/QMacInstallDialog.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/QtDialog/QMacInstallDialog.cxx')
-rw-r--r--Source/QtDialog/QMacInstallDialog.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/QtDialog/QMacInstallDialog.cxx b/Source/QtDialog/QMacInstallDialog.cxx
index c3daaf2..57ed845 100644
--- a/Source/QtDialog/QMacInstallDialog.cxx
+++ b/Source/QtDialog/QMacInstallDialog.cxx
@@ -46,6 +46,12 @@ void QMacInstallDialog::DoInstall()
newName += filename;
std::cout << "ln -s [" << file << "] [";
std::cout << newName << "]\n";
+ // Remove the old files
+ if(cmSystemTools::FileExists(newName.c_str()))
+ {
+ std::cout << "rm [" << newName << "]\n";
+ cmSystemTools::RemoveFile(newName.c_str());
+ }
cmSystemTools::CreateSymlink(file.c_str(),
newName.c_str());
}