diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-03-19 14:12:57 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-03-19 14:12:57 +0100 |
commit | cf1941ca0195829b6865de778bc24d12eb9b77d7 (patch) | |
tree | 5f3a249f9d8bcb2369912e562dc19add8e499dfa /recording.c | |
parent | 7fb99e696ffa2d0d9f0fb8e4d1c7d13fca96d94f (diff) | |
download | vdr-cf1941ca0195829b6865de778bc24d12eb9b77d7.tar.gz vdr-cf1941ca0195829b6865de778bc24d12eb9b77d7.tar.bz2 |
Only calling RemoveEmptyVideoDirectories() once in case a recording has been deleted
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/recording.c b/recording.c index b8db2647..6c1692b8 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 1.140 2006/02/26 11:59:59 kls Exp $ + * $Id: recording.c 1.141 2006/03/19 14:08:58 kls Exp $ */ #include "recording.h" @@ -83,6 +83,7 @@ void cRemoveDeletedRecordingsThread::Action(void) // Make sure only one instance of VDR does this: cLockFile LockFile(VideoDirectory); if (LockFile.Lock()) { + bool deleted = false; cThreadLock DeletedRecordingsLock(&DeletedRecordings); for (cRecording *r = DeletedRecordings.First(); r; ) { if (r->deleted && time(NULL) - r->deleted > DELETEDLIFETIME) { @@ -90,11 +91,13 @@ void cRemoveDeletedRecordingsThread::Action(void) r->Remove(); DeletedRecordings.Del(r); r = next; - RemoveEmptyVideoDirectories(); + deleted = true; continue; } r = DeletedRecordings.Next(r); } + if (deleted) + RemoveEmptyVideoDirectories(); } } |