diff --git a/src/sbbs3/listfile.cpp b/src/sbbs3/listfile.cpp
index ab7ceb07d1566659e4e30beadb6cf145330b74b5..238058b013e89f2af826c08c963e93f02e427f58 100644
--- a/src/sbbs3/listfile.cpp
+++ b/src/sbbs3/listfile.cpp
@@ -874,8 +874,8 @@ int sbbs_t::listfileinfo(uint dirnum, const char *filespec, long mode)
 									} 
 								} 
 							}
-							else if(remove(str))    /* always remove if not sysop */
-								bprintf(text[CouldntRemoveFile],str);
+							else if(remove(path))    /* always remove if not sysop */
+								bprintf(text[CouldntRemoveFile],path);
 						}
 					}
 					if(dir_op(dirnum) || useron.exempt&FLAG('R')) {