Added some additional error logging.

This commit is contained in:
Leon Styhre 2021-02-01 22:06:28 +01:00
parent 63504d0d9f
commit b1b58fe90c
2 changed files with 9 additions and 0 deletions

View file

@ -276,6 +276,8 @@ MDResolveHandle::MDResolveHandle(const ScraperSearchResult& result,
if (!Utils::FileSystem::isDirectory(Utils::FileSystem::getParent(filePath))) {
setError("Media directory does not exist and can't be created. "
"Permission problems?");
LOG(LogError) << "Couldn't create media directory: \"" <<
Utils::FileSystem::getParent(filePath) << "\"";
return;
}
@ -420,6 +422,8 @@ void MediaDownloadHandle::update()
// problems or the MediaDirectory setting points to a file instead of a directory.
if (!Utils::FileSystem::isDirectory(Utils::FileSystem::getParent(mSavePath))) {
setError("Media directory does not exist and can't be created. Permission problems?");
LOG(LogError) << "Couldn't create media directory: \"" <<
Utils::FileSystem::getParent(mSavePath) << "\"";
return;
}

View file

@ -683,6 +683,11 @@ namespace Utils
LOG(LogError) << path;
return false;
}
if (isSymlink(path)) {
LOG(LogError) << "Couldn't delete directory as it's actually a symlink";
LOG(LogError) << path;
return false;
}
#if defined(_WIN64)
if (_wrmdir(Utils::String::stringToWideString(path).c_str()) != 0) {
#else