Add minor tweaks

This commit is contained in:
2024-10-18 15:34:44 -05:00
parent 22f2cbbde8
commit 3a9af86ad2
3 changed files with 5 additions and 6 deletions

View File

@@ -150,11 +150,8 @@ public:
}
} else if (cmd == "SIZE") {
int ret = filer->fileSize(argstr);
if (ret >= 0) {
submit(213, std::to_string(ret));
} else {
submit(550, "Access Denied "+std::to_string(ret));
}
if (ret >= 0) submit(213, std::to_string(ret));
else submit(550, "Access Denied "+std::to_string(ret));
} else if (cmd == "FEAT") {
submit("211-Extensions supported:");
submit(" UTF8");

View File

@@ -2,6 +2,7 @@
#define LOGGER_H
#include <fstream>
#define LOGLEVEL_CRITICAL 4
#define LOGLEVEL_ERROR 3
#define LOGLEVEL_WARNING 2
#define LOGLEVEL_INFO 1
@@ -40,6 +41,7 @@ private:
static const char logTypeChar(int level) {
switch(level) {
default: return ' ';
case LOGLEVEL_CRITICAL: return '!';
case LOGLEVEL_ERROR: return 'E';
case LOGLEVEL_WARNING: return 'W';
case LOGLEVEL_INFO: return 'I';

View File

@@ -200,7 +200,7 @@ int main(int argc , char *argv[]) {
fdc[j].client = fdc[j+1].client;
fdc[j].close = fdc[j+1].close;
fdc[j+1] = {};
logger->print(LOGLEVEL_DEBUG, "[d] Reinitialized fdc of %i", j+1);
logger->print(LOGLEVEL_DEBUG, "Reinitialized fdc of %i", j+1);
}
}
i--;