mirror of
https://github.com/usebruno/bruno.git
synced 2025-02-22 20:51:23 +01:00
fix: fix windows filepath issues #89
This commit is contained in:
parent
9d395ded33
commit
48d26c05d9
@ -6,10 +6,15 @@ import { runCollectionFolder } from 'providers/ReduxStore/slices/collections/act
|
|||||||
import { closeCollectionRunner } from 'providers/ReduxStore/slices/collections';
|
import { closeCollectionRunner } from 'providers/ReduxStore/slices/collections';
|
||||||
import { findItemInCollection, getTotalRequestCountInCollection } from 'utils/collections';
|
import { findItemInCollection, getTotalRequestCountInCollection } from 'utils/collections';
|
||||||
import { IconRefresh, IconCircleCheck, IconCircleX, IconCheck, IconX, IconRun } from '@tabler/icons';
|
import { IconRefresh, IconCircleCheck, IconCircleX, IconCheck, IconX, IconRun } from '@tabler/icons';
|
||||||
|
import slash from 'utils/common/slash';
|
||||||
import ResponsePane from './ResponsePane';
|
import ResponsePane from './ResponsePane';
|
||||||
import StyledWrapper from './StyledWrapper';
|
import StyledWrapper from './StyledWrapper';
|
||||||
|
|
||||||
const getRelativePath = (fullPath, pathname) => {
|
const getRelativePath = (fullPath, pathname) => {
|
||||||
|
// convert to unix style path
|
||||||
|
fullPath = slash(fullPath);
|
||||||
|
pathname = slash(pathname);
|
||||||
|
|
||||||
let relativePath = path.relative(fullPath, pathname);
|
let relativePath = path.relative(fullPath, pathname);
|
||||||
const { dir, name } = path.parse(relativePath);
|
const { dir, name } = path.parse(relativePath);
|
||||||
return path.join(dir, name);
|
return path.join(dir, name);
|
||||||
|
Loading…
Reference in New Issue
Block a user