mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-07 08:34:15 +01:00
Fixed relative paths for file params in Windows (#1564)
This commit is contained in:
parent
f8eac3469f
commit
485b2f48bc
@ -4,6 +4,7 @@ import { useDispatch } from 'react-redux';
|
||||
import { browseFiles } from 'providers/ReduxStore/slices/collections/actions';
|
||||
import { IconX } from '@tabler/icons';
|
||||
import { isWindowsOS } from 'utils/common/platform';
|
||||
import slash from 'utils/common/slash';
|
||||
|
||||
const FilePickerEditor = ({ value, onChange, collection }) => {
|
||||
value = value || [];
|
||||
@ -27,7 +28,7 @@ const FilePickerEditor = ({ value, onChange, collection }) => {
|
||||
const collectionDir = collection.pathname;
|
||||
|
||||
if (filePath.startsWith(collectionDir)) {
|
||||
return path.relative(collectionDir, filePath);
|
||||
return path.relative(slash(collectionDir), slash(filePath));
|
||||
}
|
||||
|
||||
return filePath;
|
||||
|
Loading…
Reference in New Issue
Block a user