vdr 1.7.16 no longer cleans del records from video.01, video.02...
Commit Message
On Tue, 12 Oct 2010 23:56:16 +0200
Klaus Schmidinger <Klaus.Schmidinger@tvdr.de> wrote:
> Unless "atinar" or somebody else comes up with a fixed version
> of this patch, I'll simply revert to the previous version.
find attached the patch.
- use lstat
- don't check if (n < size) as it should be same
I have tested this and its working.
Steffen
@@ -368,7 +368,7 @@
cString buffer = AddDirectory(FileName, e->d_name);
if (FollowSymlinks) {
struct stat st2;
- if (stat(buffer, &st2) == 0) {
+ if (lstat(buffer, &st2) == 0) {
if (S_ISLNK(st2.st_mode)) {
int size = st2.st_size + 1;
char *l = MALLOC(char, size);
@@ -377,14 +377,12 @@
if (errno != EINVAL)
LOG_ERROR_STR(*buffer);
}
- else if (n < size) {
+ else {
l[n] = 0;
dsyslog("removing %s", l);
if (remove(l) < 0)
LOG_ERROR_STR(l);
}
- else
- esyslog("ERROR: symlink name length (%d) exceeded anticipated buffer size (%d)", n, size);
free(l);
}
}