Fix hardlinking in copyFile()

This commit is contained in:
kelson42 2015-04-09 14:26:11 +02:00
parent d7a2b44902
commit 7903458e38
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ bool makeDirectory(const string &path) {
bool copyFile(const string &sourcePath, const string &destPath) {
try {
#ifndef _WIN32
if (link(sourcePath.c_str(), destPath.c_str())) {
if (link(sourcePath.c_str(), destPath.c_str()) != 0) {
#endif
std::ifstream infile(sourcePath.c_str(), std::ios_base::binary);
std::ofstream outfile(destPath.c_str(), std::ios_base::binary);