mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
lua_filehelpers.cpp: Add lua script function 'rmdir()'
- Set Lua api version to 1.51
Origin commit data
------------------
Branch: ni/coolstream
Commit: 631708f380
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2016-09-04 (Sun, 04 Sep 2016)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -910,13 +910,16 @@ bool CFileHelpers::createDir(string& Dir, mode_t mode)
|
||||
|
||||
bool CFileHelpers::removeDir(const char *Dir)
|
||||
{
|
||||
CFileHelpers* fh = CFileHelpers::getInstance();
|
||||
fh->clearDebugInfo();
|
||||
DIR *dir;
|
||||
struct dirent *entry;
|
||||
char path[PATH_MAX];
|
||||
|
||||
dir = opendir(Dir);
|
||||
if (dir == NULL) {
|
||||
printf("Error opendir()\n");
|
||||
fh->setDebugInfo("Error opendir().", __path_file__, __func__, __LINE__);
|
||||
fh->printDebugInfo();
|
||||
return false;
|
||||
}
|
||||
while ((entry = readdir(dir)) != NULL) {
|
||||
|
Reference in New Issue
Block a user