comparison mplayer.c @ 29595:9e014b68ecb9

10l, fix misplaced check in r29613, for loop detection we must compare current file name against full name to be added, not current file name against new base path.
author reimar
date Wed, 02 Sep 2009 19:55:24 +0000
parents 331320b4557b
children 52e00a25ab71
comparison
equal deleted inserted replaced
29594:331320b4557b 29595:9e014b68ecb9
3241 temp=malloc((strlen(filename)-strlen(mp_basename(filename))+strlen(playlist_entry)+1)); 3241 temp=malloc((strlen(filename)-strlen(mp_basename(filename))+strlen(playlist_entry)+1));
3242 if (temp) 3242 if (temp)
3243 { 3243 {
3244 strncpy(temp, filename, strlen(filename)-strlen(mp_basename(filename))); 3244 strncpy(temp, filename, strlen(filename)-strlen(mp_basename(filename)));
3245 temp[strlen(filename)-strlen(mp_basename(filename))]='\0'; 3245 temp[strlen(filename)-strlen(mp_basename(filename))]='\0';
3246 strcat(temp, playlist_entry);
3246 if (!strcmp(temp, filename)) { 3247 if (!strcmp(temp, filename)) {
3247 free(temp); 3248 free(temp);
3248 continue; 3249 continue;
3249 } 3250 }
3250 strcat(temp, playlist_entry);
3251 play_tree_add_file(entry,temp); 3251 play_tree_add_file(entry,temp);
3252 mp_msg(MSGT_CPLAYER,MSGL_V,"Resolving reference to %s.\n",temp); 3252 mp_msg(MSGT_CPLAYER,MSGL_V,"Resolving reference to %s.\n",temp);
3253 free(temp); 3253 free(temp);
3254 } 3254 }
3255 } 3255 }