diff --git a/urbackupclient/client.cpp b/urbackupclient/client.cpp index 95fc4bda..ce73a586 100644 --- a/urbackupclient/client.cpp +++ b/urbackupclient/client.cpp @@ -904,12 +904,19 @@ bool IndexThread::initialCheck(const std::wstring &orig_dir, const std::wstring if(first && !os_directory_exists(os_file_prefix(add_trailing_slash(dir))) ) { +#ifdef _WIN32 + if(getFiles(os_file_prefix(add_trailing_slash(dir))).empty()) + { +#endif VSSLog(L"Cannot access directory to backup: \""+dir+L"\"", LL_ERROR); if(!optional) { index_error=true; } return false; +#ifdef _WIN32 + } +#endif } std::vector files=getFilesProxy(orig_dir, dir, named_path, !first && use_db); diff --git a/urbackupcommon/os_functions_win.cpp b/urbackupcommon/os_functions_win.cpp index 473eb116..8c0216f1 100644 --- a/urbackupcommon/os_functions_win.cpp +++ b/urbackupcommon/os_functions_win.cpp @@ -699,7 +699,7 @@ std::wstring os_get_final_path(std::wstring path) #if (_WIN32_WINNT >= 0x0600) std::wstring ret; - if(path.find(L":")==std::string::npos) + if(path.size()<3 && path.find(L":")==std::string::npos) { path+=L":"; }