You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tdarr_Plugins/FlowPlugins/FlowHelpers/1.0.0/normJoinPath.js

20 lines
629 B

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var formatWindowsRootFolder = function (path) {
// Remove '.' from end of Windows root folder mapping e.g. 'E:.'
if (path.length === 3
&& path.charAt(1) === ':'
&& path.charAt(2) === '.') {
// eslint-disable-next-line no-param-reassign
path = path.slice(0, -1);
}
return path;
};
var normJoinPath = function (_a) {
var upath = _a.upath, paths = _a.paths;
var path = upath.joinSafe.apply(upath, paths);
path = formatWindowsRootFolder(path);
return path;
};
exports.default = normJoinPath;