xjs-common 9.0.2 → 9.0.3
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.
|
@@ -27,6 +27,7 @@ exports.HttpResolverContext = exports.s_clientMode = void 0;
|
|
|
27
27
|
const tls = __importStar(require("tls"));
|
|
28
28
|
const zlib = __importStar(require("zlib"));
|
|
29
29
|
const fs = __importStar(require("fs"));
|
|
30
|
+
const path = __importStar(require("path"));
|
|
30
31
|
const url_1 = require("url");
|
|
31
32
|
const https_1 = require("https");
|
|
32
33
|
const http_1 = require("http");
|
|
@@ -261,9 +262,7 @@ class HttpResolverContext {
|
|
|
261
262
|
if (opPath) {
|
|
262
263
|
const st = u_file_1.UFile.status(opPath);
|
|
263
264
|
if (!st || st.isFile()) {
|
|
264
|
-
|
|
265
|
-
pathArray.pop();
|
|
266
|
-
if (!u_file_1.UFile.exists(pathArray))
|
|
265
|
+
if (!u_file_1.UFile.exists(path.dirname(opPath)))
|
|
267
266
|
throw new xjs_err_1.XjsErr(s_errCode, "Directory of the download file was not found.");
|
|
268
267
|
return opPath;
|
|
269
268
|
}
|