Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: SAMBA incompatibilities with VFAT=1 directory names



Simon Dean wrote:
> 
> > Ok, please choose which one:
> >
> > 1. simply stripping any '.' character(s) at the end of a directory
> name,
> > or
> >
> > 2. encoding '.' at the end of a directory name into '#2E'
> >
> > Klaus
> 
> I think in the interests of correctness it should probably be option 2
> ('#2E').
> 
> Thanks,
> 
> Simon

Can you please try this patch and let me know if it works as expected?
I'd like to include it in today's 1.0.1 release...

--- recording.c 2002/04/01 10:51:23
+++ recording.c 2002/04/21 13:55:45
@@ -222,7 +222,6 @@
                   case '+':
                   case ',':
                   case '-':
-                  case '.':
                   case ';':
                   case '=':
                   case '0' ... '9':
@@ -237,7 +236,8 @@
                   case ' ': *p = '_'; break;
                   case '~': *p = '/'; break;
                   // characters that have to be encoded:
-                  default: {
+                  default:
+                    if (*p != '.' || !*(p + 1) || *(p + 1) == '~') { // Windows can't handle '.' at the end of directory names
                        int l = p - s;
                        s = (char *)realloc(s, strlen(s) + 10);
                        p = s + l;


Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________



Home | Main Index | Thread Index