Project

General

Profile

Bug #1858 ยป undelete-0.0.7_vdr-2.1.2.patch

compile fix, up from vdr-2.1.2 - hd_brummy, 06/02/2014 05:23 PM

View differences:

undelete-0.0.7/menuundelete.c 2014-06-02 17:10:04.601335628 +0200
if (isdir || Parent)
{
temp = strdup(filename);
#if VDRVERSNUM >= 20102
char *last = temp + strlen(cVideoDirectory::Name()) + 1;
#else
char *last = temp + strlen(VideoDirectory) + 1;
#endif
for (int i = level; *last && i >= Parent ? -1 : 0; i--)
{
last = strchr(last, '/');
......
{
if (verbose.u)
isyslog("%s: purge deleted recording (%s)", plugin_name, recording->FileName());
#if VDRVERSNUM >= 20102
if (!cVideoDirectory::RemoveVideoFile(recording->FileName()))
#else
if (!RemoveVideoFile(recording->FileName()))
#endif
{
esyslog("%s: Error while remove deleted recording (%s)", plugin_name, recording->FileName());
processerror = true;
......
processerror = true;
} else
{
#if VDRVERSNUM >= 20102
if (!cVideoDirectory::RenameVideoFile(recording->FileName(), NewName))
#else
if (!RenameVideoFile(recording->FileName(), NewName))
#endif
{
esyslog("%s: Error while rename deleted recording (%s) to (%s)", plugin_name, recording->FileName(), NewName);
processerror = true;
undelete-0.0.7/undelete.c 2014-06-02 17:16:00.528024804 +0200
{
if (verbose.u)
isyslog("%s: purge deleted recording (%s)", plugin_name, recording->FileName());
#if VDRVERSNUM >= 20102
if (!cVideoDirectory::RemoveVideoFile(recording->FileName()))
#else
if (!RemoveVideoFile(recording->FileName()))
#endif
{
esyslog("%s: Error while removing deleted recording (%s)", plugin_name, recording->FileName());
return cString::sprintf("error while purging the deleted recording \"%s\" [%s]", Option, recording->Title());
......
return cString::sprintf("recording with the same name exists \"%s\" [%s]", Option, recording->Title());
} else
{
#if VDRVERSNUM >= 20102
if (!cVideoDirectory::RenameVideoFile(recording->FileName(), (const char *)NewName))
#else
if (!RenameVideoFile(recording->FileName(), (const char *)NewName))
#endif
{
esyslog("%s: Error while renaming deleted recording (%s) to (%s)", plugin_name, recording->FileName(), (const char *)NewName);
return cString::sprintf("error while renaming deleted recording \"%s\" [%s]", Option, recording->Title());
......
#endif
void cRemoveThread::Action(void)
#if VDRVERSNUM >= 20102
{
d1syslogi("cRemoveThread::Action", "cVideoDirectory::RemoveEmptyVideoDirectories thread started (pid=%d)", getpid());
cVideoDirectory::RemoveEmptyVideoDirectories();
d1syslogi("cRemoveThread::Action", "cVideoDirectory::RemoveEmptyVideoDirectories thread ended (pid=%d)", getpid());
}
#else
{
d1syslogi("cRemoveThread::Action", "RemoveEmptyVideoDirectories thread started (pid=%d)", getpid());
RemoveEmptyVideoDirectories();
d1syslogi("cRemoveThread::Action", "RemoveEmptyVideoDirectories thread ended (pid=%d)", getpid());
}
#endif
bool cRemoveThread::ActiveWithCancel(void)
{
    (1-1/1)