Commit 4a5d13b8 authored by rswindell's avatar rswindell
Browse files

Don't attempt to rename a file that doesn't exist.

parent 67bc12d2
......@@ -990,7 +990,7 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode)
else {
sprintf(path,"%s%s",dirpath,fname);
sprintf(tmp,"%s%s",dirpath,str);
if(rename(path,tmp))
if(fexistcase(path) && rename(path,tmp))
bprintf(text[CouldntRenameFile],path,tmp);
else {
bprintf(text[FileRenamed],path,tmp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment