More detailed error when opening non-existent directory.
This commit is contained in:
parent
4d546b6818
commit
d29c77b2d5
@ -431,7 +431,7 @@ std::vector<std::string> Client::DirectorySearch(std::string directory, std::str
|
|||||||
findFileHandle = _findfirst(fileMatch.c_str(), ¤tFile);
|
findFileHandle = _findfirst(fileMatch.c_str(), ¤tFile);
|
||||||
if (findFileHandle == -1L)
|
if (findFileHandle == -1L)
|
||||||
{
|
{
|
||||||
printf("Unable to open directory\n");
|
printf("Unable to open directory: %s\n", directory.c_str());
|
||||||
return std::vector<std::string>();
|
return std::vector<std::string>();
|
||||||
}
|
}
|
||||||
do
|
do
|
||||||
@ -448,7 +448,7 @@ std::vector<std::string> Client::DirectorySearch(std::string directory, std::str
|
|||||||
DIR *directoryHandle = opendir(directory.c_str());
|
DIR *directoryHandle = opendir(directory.c_str());
|
||||||
if(!directoryHandle)
|
if(!directoryHandle)
|
||||||
{
|
{
|
||||||
printf("Unable to open directory\n");
|
printf("Unable to open directory: %s\n", directory.c_str());
|
||||||
return std::vector<std::string>();
|
return std::vector<std::string>();
|
||||||
}
|
}
|
||||||
while(directoryEntry = readdir(directoryHandle))
|
while(directoryEntry = readdir(directoryHandle))
|
||||||
|
Reference in New Issue
Block a user