Fix backup of file shares

This commit is contained in:
Martin 2015-01-27 21:48:32 +01:00
parent 3e2ff1a2fa
commit fd0aeaa232
2 changed files with 8 additions and 1 deletions

View File

@ -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<SFileAndHash> files=getFilesProxy(orig_dir, dir, named_path, !first && use_db);

View File

@ -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":";
}