Skip to content
Snippets Groups Projects
Commit c2037024 authored by Logan Dethrow's avatar Logan Dethrow
Browse files

VWR-25861 VWR-25862 Removed LLDir_Mac::deleteFilesInDir() virtual method.

The LLDir base class method will now be used instead. The handling of the mask
parameter was inconsistent between the two implementations, and the failure
to remove the old method was probably just an oversight.
parent 57bdcd6b
No related branches found
No related tags found
No related merge requests found
...@@ -258,38 +258,6 @@ U32 LLDir_Mac::countFilesInDir(const std::string &dirname, const std::string &ma ...@@ -258,38 +258,6 @@ U32 LLDir_Mac::countFilesInDir(const std::string &dirname, const std::string &ma
return (file_count); return (file_count);
} }
S32 LLDir_Mac::deleteFilesInDir(const std::string &dirname, const std::string &mask)
{
glob_t g;
S32 result = 0;
std::string tmp_str;
tmp_str = dirname;
tmp_str += mask;
if(glob(tmp_str.c_str(), GLOB_NOSORT, NULL, &g) == 0)
{
int i;
for(i = 0; i < g.gl_pathc; i++)
{
// llinfos << "deleteFilesInDir: deleting number " << i << ", path is " << g.gl_pathv[i] << llendl;
if(unlink(g.gl_pathv[i]) != 0)
{
result = errno;
llwarns << "Problem removing " << g.gl_pathv[i] << " - errorcode: "
<< result << llendl;
}
}
globfree(&g);
}
return(result);
}
std::string LLDir_Mac::getCurPath() std::string LLDir_Mac::getCurPath()
{ {
char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */ char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */
......
...@@ -44,7 +44,6 @@ class LLDir_Mac : public LLDir ...@@ -44,7 +44,6 @@ class LLDir_Mac : public LLDir
/*virtual*/ void initAppDirs(const std::string &app_name, /*virtual*/ void initAppDirs(const std::string &app_name,
const std::string& app_read_only_data_dir); const std::string& app_read_only_data_dir);
virtual S32 deleteFilesInDir(const std::string &dirname, const std::string &mask);
virtual std::string getCurPath(); virtual std::string getCurPath();
virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask); virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
virtual BOOL fileExists(const std::string &filename) const; virtual BOOL fileExists(const std::string &filename) const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment