PhotoRec: avoid successive '_' chars in filenames
This commit is contained in:
parent
1121817a82
commit
8b12fd3d04
1 changed files with 4 additions and 2 deletions
|
@ -401,7 +401,8 @@ void file_rename(const char *old_filename, const unsigned char *buffer, const in
|
|||
case '\\':
|
||||
case ':':
|
||||
case '*':
|
||||
*dst++ = '_';
|
||||
if(*(dst-1) != '_')
|
||||
*dst++ = '_';
|
||||
bad++;
|
||||
break;
|
||||
default:
|
||||
|
@ -412,7 +413,8 @@ void file_rename(const char *old_filename, const unsigned char *buffer, const in
|
|||
}
|
||||
else
|
||||
{
|
||||
*dst++ = '_';
|
||||
if(*(dst-1) != '_')
|
||||
*dst++ = '_';
|
||||
bad++;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue