Skip to content

Commit d36dea2

Browse files
Remove sym. link before creating a new one
1 parent 0218156 commit d36dea2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/commons/FileUtil.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ void FileUtil::symlinkAlias(const std::string &file, const std::string &alias) {
183183
}
184184

185185
void FileUtil::symlinkAbs(const std::string &target, const std::string &link) {
186+
if(FileUtil::fileExists(link.c_str())){
187+
FileUtil::remove(link.c_str());
188+
}
186189
char *t = realpath(target.c_str(), NULL);
187190
if (t == NULL) {
188191
Debug(Debug::ERROR) << "Could not get realpath of " << target << "!\n";

0 commit comments

Comments
 (0)