"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "rename.c" between
ytree-2.00.tar.gz and ytree-2.01.tar.gz

About: Ytree is a (curses-based) file manager for browsing filesystems and archives.

rename.c  (ytree-2.00):rename.c  (ytree-2.01)
/*************************************************************************** /***************************************************************************
* *
* $Header: /usr/local/cvsroot/utils/ytree/rename.c,v 1.14 2014/12/26 09:53:11 w erner Exp $ * $Header: /usr/local/cvsroot/utils/ytree/rename.c,v 1.15 2020/02/10 18:55:40 w erner Exp $
* *
* Umbenennen von Dateien/Verzeichnissen * Umbenennen von Dateien/Verzeichnissen
* *
***************************************************************************/ ***************************************************************************/
#include "ytree.h" #include "ytree.h"
static int RenameDirEntry(char *to_path, char *from_path); static int RenameDirEntry(char *to_path, char *from_path);
static int RenameFileEntry(char *to_path, char *from_path); static int RenameFileEntry(char *to_path, char *from_path);
skipping to change at line 244 skipping to change at line 244
} }
(void) strcpy( new_name, (old_name) ? old_name : "*" ); (void) strcpy( new_name, (old_name) ? old_name : "*" );
if( InputString(new_name, LINES - 2, l, 0, COLS - l - 1, "\r\033" ) != CR) if( InputString(new_name, LINES - 2, l, 0, COLS - l - 1, "\r\033" ) != CR)
return( -1 ); return( -1 );
if(!strlen(new_name)) if(!strlen(new_name))
return( -1 ); return( -1 );
if(!strcmp(old_name, new_name)) if(old_name && !strcmp(old_name, new_name))
{ {
MESSAGE("Can't rename: New name same as old name."); MESSAGE("Can't rename: New name same as old name.");
return( -1 ); return( -1 );
} }
if(strrchr(new_name, FILE_SEPARATOR_CHAR) != NULL) if(strrchr(new_name, FILE_SEPARATOR_CHAR) != NULL)
{ {
MESSAGE("Invalid new name:*No slashes when renaming!"); MESSAGE("Invalid new name:*No slashes when renaming!");
return( -1 ); return( -1 );
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)