fix: fix windows filepath issues #89

This commit is contained in:
Anoop M D 2023-02-12 21:59:20 +05:30
parent 9d395ded33
commit 48d26c05d9

View File

@ -6,10 +6,15 @@ import { runCollectionFolder } from 'providers/ReduxStore/slices/collections/act
import { closeCollectionRunner } from 'providers/ReduxStore/slices/collections';
import { findItemInCollection, getTotalRequestCountInCollection } from 'utils/collections';
import { IconRefresh, IconCircleCheck, IconCircleX, IconCheck, IconX, IconRun } from '@tabler/icons';
import slash from 'utils/common/slash';
import ResponsePane from './ResponsePane';
import StyledWrapper from './StyledWrapper';
const getRelativePath = (fullPath, pathname) => {
// convert to unix style path
fullPath = slash(fullPath);
pathname = slash(pathname);
let relativePath = path.relative(fullPath, pathname);
const { dir, name } = path.parse(relativePath);
return path.join(dir, name);