mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-25 05:45:42 +03:00
fixed small error:
csync/first/a~ was renamed to: csync/first/~a_conflict-20110326-190457~ but it should be: csync/first/a_conflict-20110326-190457~
This commit is contained in:
parent
d842119065
commit
9864baa0c8
1 changed files with 19 additions and 21 deletions
|
@ -413,13 +413,12 @@ C_PATHINFO * c_split_path(const char* pathSrc)
|
|||
if (lastSep)
|
||||
{
|
||||
pathinfo->directory = path; // Pick up the path
|
||||
//*lastSep++ = '\0'; // Truncate directory
|
||||
//pathinfo->filename = lastSep; // Pick up name after path
|
||||
|
||||
memmove(lastSep + 2, lastSep+1, strlen(lastSep));
|
||||
*(lastSep+1)='\0';
|
||||
pathinfo->filename = lastSep+2;
|
||||
|
||||
memmove(lastSep + 1, lastSep, strlen(lastSep));
|
||||
*lastSep++ ='/';
|
||||
*lastSep++ ='\0'; // Truncate directory
|
||||
|
||||
pathinfo->filename = lastSep; // Pick up name after path
|
||||
}
|
||||
|
||||
// Start at the second character of the filename to handle
|
||||
|
@ -440,21 +439,20 @@ C_PATHINFO * c_split_path(const char* pathSrc)
|
|||
*extension = '\0'; // Truncate filename
|
||||
}
|
||||
else
|
||||
{
|
||||
//tmp files from kate/kwrite "somefile~": '~' should be the extension
|
||||
len=strlen(pathinfo->filename);
|
||||
if(len>1)
|
||||
{
|
||||
//printf("%i\n",pathinfo->filename[len-1]);
|
||||
//printf("%i\n",'~');
|
||||
if(pathinfo->filename[len-1]=='~')
|
||||
{
|
||||
//printf("kate file found\n");
|
||||
pathinfo->filename[len-1]='\0'; // Truncate filename
|
||||
pathinfo->extension[0]='~';
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
len=strlen(pathinfo->filename);
|
||||
if(len>1)
|
||||
{
|
||||
//tmp files from kate/kwrite "somefile~": '~' should be the extension
|
||||
if(pathinfo->filename[len-1]=='~')
|
||||
{
|
||||
extension = &pathinfo->filename[len-1];
|
||||
memmove(extension + 1, extension, strlen(extension));
|
||||
pathinfo->extension = extension + 1;
|
||||
*extension = '\0'; // Truncate filename
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue