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>
|
||||
|
||||
* 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*/
|
||||
dir = opendir (filepath.c_str ());
|
||||
|
||||
|
||||
/*If not open*/
|
||||
if (dir == NULL) {
|
||||
/**If not exists*/
|
||||
|
@ -207,6 +207,9 @@ Pandora_File::removeDir (const string filepath) {
|
|||
if (rmdir (filepath.c_str ()) == -1) {
|
||||
return DELETE_ERROR;
|
||||
}
|
||||
|
||||
/*Close dir oppened*/
|
||||
closedir(dir);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue