badmfck-api-server 4.1.7 → 4.1.8

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.
@@ -486,7 +486,8 @@ class APIService extends BaseService_1.BaseService {
486
486
  else {
487
487
  try {
488
488
  if (data.file) {
489
- const filePath = path_1.default.isAbsolute(data.file) ? data.file : path_1.default.resolve(data.file);
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "4.1.07",
3
+ "version": "4.1.08",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",