mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed a lengthy write lock on the Recordings list in case of moving a folder with more than one recording
This commit is contained in:
parent
e5e0315d34
commit
c868265397
@ -3286,6 +3286,8 @@ Matthias Senzel <matthias.senzel@t-online.de>
|
||||
for reporting a crash when moving a recording between different volumes
|
||||
for reporting a deadlock when moving a folder containing several recordings between
|
||||
different volumes
|
||||
for fixing a lengthy write lock on the Recordings list in case of moving a folder with
|
||||
more than one recording
|
||||
|
||||
Marek Nazarko <mnazarko@gmail.com>
|
||||
for translating OSD texts to the Polish language
|
||||
|
4
HISTORY
4
HISTORY
@ -9162,7 +9162,7 @@ Video Disk Recorder Revision History
|
||||
a subdirectory.
|
||||
- SVDRP peering can now be limited to the default SVDRP host (see MANUAL for details).
|
||||
|
||||
2017-12-04: Version 2.3.9
|
||||
2017-12-05: Version 2.3.9
|
||||
|
||||
- Updated the Italian OSD texts (thanks to Diego Pierotto).
|
||||
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
||||
@ -9219,3 +9219,5 @@ Video Disk Recorder Revision History
|
||||
menu, in case there is a LastReplayed recording.
|
||||
- The CAM menu is now automatically closed when the current channel is switched
|
||||
(suggested by Dietmar Spingler).
|
||||
- Fixed a lengthy write lock on the Recordings list in case of moving a folder with
|
||||
more than one recording (thanks to Matthias Senzel).
|
||||
|
12
menu.c
12
menu.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: menu.c 4.48 2017/12/04 15:25:57 kls Exp $
|
||||
* $Id: menu.c 4.49 2017/12/05 16:39:57 kls Exp $
|
||||
*/
|
||||
|
||||
#include "menu.h"
|
||||
@ -2479,11 +2479,15 @@ eOSState cMenuPathEdit::ApplyChanges(void)
|
||||
cString NewPath = *folder ? cString::sprintf("%s%c%s", folder, FOLDERDELIMCHAR, name) : name;
|
||||
NewPath.CompactChars(FOLDERDELIMCHAR);
|
||||
if (strcmp(NewPath, path)) {
|
||||
LOCK_RECORDINGS_WRITE;
|
||||
Recordings->SetExplicitModify();
|
||||
int NumRecordings = Recordings->GetNumRecordingsInPath(path);
|
||||
int NumRecordings = 0;
|
||||
{
|
||||
LOCK_RECORDINGS_READ;
|
||||
NumRecordings = Recordings->GetNumRecordingsInPath(path);
|
||||
}
|
||||
if (NumRecordings > 1 && !Interface->Confirm(cString::sprintf(tr("Move entire folder containing %d recordings?"), NumRecordings)))
|
||||
return osContinue;
|
||||
LOCK_RECORDINGS_WRITE;
|
||||
Recordings->SetExplicitModify();
|
||||
if (!Recordings->MoveRecordings(path, NewPath)) {
|
||||
Skins.Message(mtError, tr("Error while moving folder!"));
|
||||
return osContinue;
|
||||
|
Loading…
Reference in New Issue
Block a user