mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
2010-07-16 Dario Rodriguez <dario.rodriguez@artica.es>
* misc/pandora_file.cc: fixed unclosed directory with function closedir. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3017 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
2043eb3c52
commit
16efe7ca33
@ -1,3 +1,7 @@
|
|||||||
|
2010-07-16 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||||
|
|
||||||
|
* misc/pandora_file.cc: fixed unclosed directory with function closedir.
|
||||||
|
|
||||||
2010-07-16 Dario Rodriguez <dario.rodriguez@artica.es>
|
2010-07-16 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||||
|
|
||||||
* misc/pandora_file.cc, pandora_file.h: Added function to remove directories
|
* misc/pandora_file.cc, pandora_file.h: Added function to remove directories
|
||||||
|
@ -154,7 +154,7 @@ Pandora_File::removeDir (const string filepath) {
|
|||||||
|
|
||||||
/*Open the directory*/
|
/*Open the directory*/
|
||||||
dir = opendir (filepath.c_str ());
|
dir = opendir (filepath.c_str ());
|
||||||
|
|
||||||
/*If not open*/
|
/*If not open*/
|
||||||
if (dir == NULL) {
|
if (dir == NULL) {
|
||||||
/**If not exists*/
|
/**If not exists*/
|
||||||
@ -207,6 +207,9 @@ Pandora_File::removeDir (const string filepath) {
|
|||||||
if (rmdir (filepath.c_str ()) == -1) {
|
if (rmdir (filepath.c_str ()) == -1) {
|
||||||
return DELETE_ERROR;
|
return DELETE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*Close dir oppened*/
|
||||||
|
closedir(dir);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user