LinuxTV Patchwork vdr 1.7.23: patch for handling symlinks in recordings directory as earlier

login
register
mail settings
Submitter Klaus Schmidinger
Date Jan. 26, 2012, 10:07 a.m.
Message ID <4F2125D6.2020505@tvdr.de>
Download mbox | patch
Permalink /patch/12926/
State New
Headers show

Comments

Klaus Schmidinger - Jan. 26, 2012, 10:07 a.m.
On 25.01.2012 14:11, Oliver Endriss wrote:
> On Wednesday 25 January 2012 10:29:16 Klaus Schmidinger wrote:
>> On 17.01.2012 14:26, sundararaj reel wrote:
>>> Hi,
>>>
>>> I am attaching a patch for vdr 1.7.23 for the problem described here:
>>> http://www.vdr-portal.de/board1-news/board2-vdr-news/p1047199-announce-vdr-developer-version-1-7-23/#post1047199
>>>
>>> There appears to be a problem in listing recordings due to a bug fix
>>> in vdr 1.7.23. "Fixed handling symbolic links in
>>> cRecordings::ScanVideoDir()"
>>>
>>> The attached patch just disables the translation of symbolic links to
>>> "real" paths. So that all recordings appear to be under the same
>>> (recordings) directory tree, as it was earlier.
>>>
>>> Please reply with your results.
>>
>> Can somebody who has actually this use case please confirm
>> whether this patch fixes the problem?
>
> Confirmed.
>
> Without this patch, symbolic links are not displayed
> correctly on my machine.
>
> Oliver

Thanks.

I believe the second call to stat() is now superfluous.
Can you please confirm that the following patch still works
as expected?



Klaus
Oliver Endriss - Jan. 27, 2012, 12:04 p.m.
On Thursday 26 January 2012 11:07:18 Klaus Schmidinger wrote:
> On 25.01.2012 14:11, Oliver Endriss wrote:
> > On Wednesday 25 January 2012 10:29:16 Klaus Schmidinger wrote:
> >> On 17.01.2012 14:26, sundararaj reel wrote:
> >>> Hi,
> >>>
> >>> I am attaching a patch for vdr 1.7.23 for the problem described here:
> >>> http://www.vdr-portal.de/board1-news/board2-vdr-news/p1047199-announce-vdr-developer-version-1-7-23/#post1047199
> >>>
> >>> There appears to be a problem in listing recordings due to a bug fix
> >>> in vdr 1.7.23. "Fixed handling symbolic links in
> >>> cRecordings::ScanVideoDir()"
> >>>
> >>> The attached patch just disables the translation of symbolic links to
> >>> "real" paths. So that all recordings appear to be under the same
> >>> (recordings) directory tree, as it was earlier.
> >>>
> >>> Please reply with your results.
> >>
> >> Can somebody who has actually this use case please confirm
> >> whether this patch fixes the problem?
> >
> > Confirmed.
> >
> > Without this patch, symbolic links are not displayed
> > correctly on my machine.
> >
> > Oliver
> 
> Thanks.
> 
> I believe the second call to stat() is now superfluous.
> Can you please confirm that the following patch still works
> as expected?
> 
> --- recording.c 2012/01/25 09:32:39     2.45
> +++ recording.c 2012/01/26 10:02:29
> @@ -1120,11 +1120,6 @@
>                       continue;
>                       }
>                    Link = 1;
> -                 buffer = ReadLink(buffer);
> -                 if (!*buffer)
> -                    continue;
> -                 if (stat(buffer, &st) != 0)
> -                    continue;
>                    }
>                 if (S_ISDIR(st.st_mode)) {
>                    if (endswith(buffer, deleted ? DELEXT : RECEXT)) {

Yes, it does not make any difference here.

CU
Oliver
Lucian Muresan - Feb. 12, 2012, 10:11 p.m.
On 01/27/2012 01:04 PM, Oliver Endriss wrote:
> On Thursday 26 January 2012 11:07:18 Klaus Schmidinger wrote:
>> On 25.01.2012 14:11, Oliver Endriss wrote:
>>> On Wednesday 25 January 2012 10:29:16 Klaus Schmidinger wrote:
>>>> On 17.01.2012 14:26, sundararaj reel wrote:
>>>>> Hi,
>>>>>
>>>>> I am attaching a patch for vdr 1.7.23 for the problem described here:
>>>>> http://www.vdr-portal.de/board1-news/board2-vdr-news/p1047199-announce-vdr-developer-version-1-7-23/#post1047199
>>>>>
>>>>> There appears to be a problem in listing recordings due to a bug fix
>>>>> in vdr 1.7.23. "Fixed handling symbolic links in
>>>>> cRecordings::ScanVideoDir()"
>>>>>
>>>>> The attached patch just disables the translation of symbolic links to
>>>>> "real" paths. So that all recordings appear to be under the same
>>>>> (recordings) directory tree, as it was earlier.
>>>>>
>>>>> Please reply with your results.
>>>>
>>>> Can somebody who has actually this use case please confirm
>>>> whether this patch fixes the problem?
>>>
>>> Confirmed.
>>>
>>> Without this patch, symbolic links are not displayed
>>> correctly on my machine.
>>>
>>> Oliver
>>
>> Thanks.
>>
>> I believe the second call to stat() is now superfluous.
>> Can you please confirm that the following patch still works
>> as expected?
>>
>> --- recording.c 2012/01/25 09:32:39     2.45
>> +++ recording.c 2012/01/26 10:02:29
>> @@ -1120,11 +1120,6 @@
>>                        continue;
>>                        }sundararaj reel
>>                     Link = 1;
>> -                 buffer = ReadLink(buffer);
>> -                 if (!*buffer)
>> -                    continue;
>> -                 if (stat(buffer,&st) != 0)
>> -                    continue;
>>                     }
>>                  if (S_ISDIR(st.st_mode)) {
>>                     if (endswith(buffer, deleted ? DELEXT : RECEXT)) {
>
> Yes, it does not make any difference here.

Well, with this patch, symbolic links are not displayed at all on my VDR 
machine, whereas with sundararaj reel's fix they are displayed correctly.

Cheers,
Lucian

Patch

--- recording.c 2012/01/25 09:32:39     2.45
+++ recording.c 2012/01/26 10:02:29
@@ -1120,11 +1120,6 @@ 
                      continue;
                      }
                   Link = 1;
-                 buffer = ReadLink(buffer);
-                 if (!*buffer)
-                    continue;
-                 if (stat(buffer, &st) != 0)
-                    continue;
                   }
                if (S_ISDIR(st.st_mode)) {
                   if (endswith(buffer, deleted ? DELEXT : RECEXT)) {

Privacy Policy