Wrap FS::write in try catch

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2024-09-16 12:42:09 +03:00
parent d38e7fa142
commit d2f0d1d8d5
2 changed files with 11 additions and 2 deletions

View File

@ -173,7 +173,11 @@ void InstanceCopyTask::copyFinished()
allowed_symlinks_file
.filePath()); // we dont want to modify the original. also make sure the resulting file is not itself a link.
FS::write(allowed_symlinks_file.filePath(), allowed_symlinks);
try {
FS::write(allowed_symlinks_file.filePath(), allowed_symlinks);
} catch (const FS::FileSystemException& e) {
qCritical() << "Failed to write symlink :" << e.cause();
}
}
emitSucceeded();