Skip to content

Commit

Permalink
Merge pull request #97 from Marnalas/flowPluginApplyRadarrOrSonarrNam…
Browse files Browse the repository at this point in the history
…ingPolicy

Made file path building system agnostic
  • Loading branch information
Marnalas authored Jan 11, 2025
2 parents b3e90c2 + 24466ec commit 258a567
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.details = void 0;
var path_1 = __importDefault(require("path"));
var fileMoveOrCopy_1 = __importDefault(require("../../../../FlowHelpers/1.0.0/fileMoveOrCopy"));
var fileUtils_1 = require("../../../../FlowHelpers/1.0.0/fileUtils");
var details = function () { return ({
Expand Down Expand Up @@ -139,7 +140,7 @@ var buildNewPath = function (currentFileName, fileToRename) {
var directory = (0, fileUtils_1.getFileAbosluteDir)(currentFileName);
var fileName = (0, fileUtils_1.getFileName)(fileToRename.newPath);
var container = (0, fileUtils_1.getContainer)(fileToRename.newPath);
return "".concat(directory, "/").concat(fileName, ".").concat(container);
return path_1.default.join(directory, fileName, container);
};
var previewRename = function (args, host, headers, fileInfo, config) { return __awaiter(void 0, void 0, void 0, function () {
var response, error_1;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import path from 'path';
import fileMoveOrCopy from '../../../../FlowHelpers/1.0.0/fileMoveOrCopy';
import {
getContainer,
Expand Down Expand Up @@ -127,7 +128,7 @@ const buildNewPath = (currentFileName: string, fileToRename: IFileToRename): str
const directory = getFileAbosluteDir(currentFileName);
const fileName = getFileName(fileToRename.newPath);
const container = getContainer(fileToRename.newPath);
return `${directory}/${fileName}.${container}`;
return path.join(directory, fileName, container);
};

const previewRename = async (
Expand Down

0 comments on commit 258a567

Please sign in to comment.