diff --git a/OperationSharePaths.cpp b/OperationSharePaths.cpp index ecf37d6..ff50484 100644 --- a/OperationSharePaths.cpp +++ b/OperationSharePaths.cpp @@ -22,7 +22,7 @@ OperationSharePaths::OperationSharePaths(std::queue & oArgList) : bool bAdminOnly = false; bool bHiddenIncluded = false; std::wregex oMatchRegex = std::wregex(L".*"); - std::wregex oNoMatchRegex = std::wregex(L"\0"); + std::wregex oNoMatchRegex = std::wregex(L":"); if (sSubArgs.size() == 2) { // further split the second arg into a command delimited list @@ -51,7 +51,7 @@ OperationSharePaths::OperationSharePaths(std::queue & oArgList) : try { // parse the regular expression - (_wcsnicmp((*sShareArg).c_str(), sMatchArg, _countof(sMatchArg) - 1) == 0) ? oMatchRegex : oNoMatchRegex = + ((_wcsnicmp((*sShareArg).c_str(), sMatchArg, _countof(sMatchArg) - 1) == 0) ? oMatchRegex : oNoMatchRegex) = std::wregex(oMatchArgs[1], std::regex_constants::icase); } catch (std::exception &) @@ -123,10 +123,10 @@ OperationSharePaths::OperationSharePaths(std::queue & oArgList) : std::transform(sLocalPath.begin(), sLocalPath.end(), sLocalPath.begin(), ::toupper); // see if the share name matches the regular expression - if (!std::regex_match(tInfo[iEntry].shi2_netname, oMatchRegex)) continue; + if (!std::regex_search(tInfo[iEntry].shi2_netname, oMatchRegex)) continue; // see if the share name does not match the regular expression - if (std::regex_match(tInfo[iEntry].shi2_netname, oNoMatchRegex)) continue; + if (std::regex_search(tInfo[iEntry].shi2_netname, oNoMatchRegex)) continue; // add path to the share list mPaths[tInfo[iEntry].shi2_netname] = sLocalPath; diff --git a/Version.h b/Version.h index 428989e..915823a 100644 --- a/Version.h +++ b/Version.h @@ -1,3 +1,3 @@ #pragma once -#define VERSION_STRING "1.6.2.0" +#define VERSION_STRING "1.6.2.1"