Better destination file exist check
This commit is contained in:
parent
4e7fdbf288
commit
a91c5a1913
@ -38,6 +38,8 @@ v0.71.1 28-Nov-2004
|
||||
Better error reporting if something is wrong.
|
||||
The import command now also figures out the difference between
|
||||
8.3 and long filenames and does the right thing during import.
|
||||
During file import the destination is tested for both 8.3 and
|
||||
LFN for an existing file. Improved error reporting.
|
||||
|
||||
mbfido:
|
||||
In rfc2ftn a debug logmessage added to check for unrecognised
|
||||
|
@ -318,10 +318,10 @@ int AddFile(struct FILE_record f_db, int Area, char *DestPath, char *FromPath, c
|
||||
*/
|
||||
mkdirs(DestPath, 0775);
|
||||
|
||||
if (file_exist(DestPath, F_OK) == 0) {
|
||||
WriteError("File %s already exists in area %d", f_db.Name, Area);
|
||||
if ((file_exist(DestPath, F_OK) == 0) || (file_exist(LinkPath, F_OK) == 0)) {
|
||||
WriteError("File %s (%s) already exists in area %d", f_db.Name, f_db.LName, Area);
|
||||
if (!do_quiet)
|
||||
printf("\nFile %s already exists in area %d\n", f_db.Name, Area);
|
||||
printf("\nFile %s (%s) already exists in area %d\n", f_db.Name, f_db.LName, Area);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user