diff --git a/es-app/src/scrapers/Scraper.cpp b/es-app/src/scrapers/Scraper.cpp index 0669ce43a..5b4a75d9e 100644 --- a/es-app/src/scrapers/Scraper.cpp +++ b/es-app/src/scrapers/Scraper.cpp @@ -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; } diff --git a/es-core/src/utils/FileSystemUtil.cpp b/es-core/src/utils/FileSystemUtil.cpp index 587b1e725..95188c69e 100644 --- a/es-core/src/utils/FileSystemUtil.cpp +++ b/es-core/src/utils/FileSystemUtil.cpp @@ -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