badmfck-api-server 4.1.7 → 4.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -98,7 +98,7 @@ async function Initializer(services) {
|
|
|
98
98
|
}
|
|
99
99
|
exports.Initializer = Initializer;
|
|
100
100
|
class APIService extends BaseService_1.BaseService {
|
|
101
|
-
version = "4.1.
|
|
101
|
+
version = "4.1.09";
|
|
102
102
|
options;
|
|
103
103
|
monitor = null;
|
|
104
104
|
started = new Date();
|
|
@@ -486,7 +486,8 @@ class APIService extends BaseService_1.BaseService {
|
|
|
486
486
|
else {
|
|
487
487
|
try {
|
|
488
488
|
if (data.file) {
|
|
489
|
-
const
|
|
489
|
+
const normalizedFile = process.platform === "win32" ? data.file : data.file.replaceAll("\\", "/");
|
|
490
|
+
const filePath = path_1.default.isAbsolute(normalizedFile) ? normalizedFile : path_1.default.resolve(normalizedFile);
|
|
490
491
|
const onSendFileError = (err) => {
|
|
491
492
|
(0, LogService_1.logError)("Can't send file: " + filePath);
|
|
492
493
|
if (!res.headersSent && !res.writableEnded) {
|