Deleting a file without ext print a normal error msg.

This commit is contained in:
Olivier Gagnon
2021-05-17 18:09:47 -04:00
parent b9c292f7cf
commit afc1347d3a
3 changed files with 12 additions and 2 deletions
+1
View File
@@ -181,6 +181,7 @@ export class BaseServer {
* @returns {IReturnStatus} Return status object indicating whether or not file was deleted
*/
removeFile(fn: string): IReturnStatus {
console.log(`removing ${fn}`);
if (fn.endsWith(".exe") || fn.match(/^.+\.exe-\d+(?:\.\d*)?%-INC$/) != null) {
for (let i = 0; i < this.programs.length; ++i) {
if (this.programs[i] === fn) {