diff -ru vdr-1.6.0-orig/menu.c vdr-1.6.0/menu.c --- vdr-1.6.0-orig/menu.c 2009-06-04 10:01:37.538006043 +0200 +++ vdr-1.6.0/menu.c 2009-06-04 10:04:02.967985781 +0200 @@ -2495,14 +2495,14 @@ priority = recording->priority; lifetime = recording->lifetime; - char* p = strrchr(recording->Name(), '~'); + const char* p = strrchr(recording->Name(), '~'); if (p) { p++; Utf8Strn0Cpy(name, p, sizeof(name)); Utf8Strn0Cpy(path, recording->Name(), sizeof(path)); - p = strrchr(path, '~'); - if (p) - p[0] = 0; + char* p2 = strrchr(path, '~'); + if (p2) + p2[0] = 0; } else { Utf8Strn0Cpy(name, recording->Name(), sizeof(name)); diff -ru vdr-1.6.0-orig/videodir.c vdr-1.6.0/videodir.c --- vdr-1.6.0-orig/videodir.c 2009-06-04 10:01:37.531340365 +0200 +++ vdr-1.6.0/videodir.c 2009-06-04 10:22:20.074546524 +0200 @@ -196,9 +196,10 @@ #ifdef USE_HARDLINKCUTTER static bool StatNearestDir(const char *FileName, struct stat *Stat) { - cString Name(FileName); + char *Name = strdup(FileName); + cString Name_str(Name, true); /* manage free for us */ char *p; - while ((p = strrchr((const char*)Name + 1, '/')) != NULL) { + while ((p = strrchr(Name + 1, '/')) != NULL) { *p = 0; // truncate at last '/' if (stat(Name, Stat) == 0) { isyslog("StatNearestDir: Stating %s", (const char*)Name);