summaryrefslogtreecommitdiff
path: root/videodir.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-02-11 14:53:44 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2001-02-11 14:53:44 +0100
commit80a42f130003dabf7c70de35f446f4dbcf1ea3cf (patch)
treea008421d972a9c4eefd20d81dfb0cddbd7802b9e /videodir.c
parentc0ed9649a3f32b4510eddb47dfd82bcc860eac70 (diff)
downloadvdr-80a42f130003dabf7c70de35f446f4dbcf1ea3cf.tar.gz
vdr-80a42f130003dabf7c70de35f446f4dbcf1ea3cf.tar.bz2
Removing empty directories
Diffstat (limited to 'videodir.c')
-rw-r--r--videodir.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/videodir.c b/videodir.c
index 4d5c2572..2824d04e 100644
--- a/videodir.c
+++ b/videodir.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: videodir.c 1.3 2000/12/24 12:51:41 kls Exp $
+ * $Id: videodir.c 1.4 2001/02/11 13:48:30 kls Exp $
*/
#include "videodir.h"
@@ -28,7 +28,7 @@ public:
cVideoDirectory(void);
~cVideoDirectory();
uint FreeMB(void);
- const char *Name(void) { return name; }
+ const char *Name(void) { return name ? name : VideoDirectory; }
const char *Stored(void) { return stored; }
int Length(void) { return length; }
bool IsDistributed(void) { return name != NULL; }
@@ -197,3 +197,11 @@ const char *PrefixVideoFileName(const char *FileName, char Prefix)
return PrefixedName;
}
+void RemoveEmptyVideoDirectories(void)
+{
+ cVideoDirectory Dir;
+ do {
+ RemoveEmptyDirectories(Dir.Name());
+ } while (Dir.Next());
+}
+