mirror of
https://github.com/usebruno/bruno.git
synced 2025-01-23 22:28:39 +01:00
adds PATH_SEPARATOR constant
This commit is contained in:
parent
9ca22cd1d1
commit
b07ccbdfab
@ -21,7 +21,7 @@ import {
|
||||
} from 'utils/collections';
|
||||
import { collectionSchema, itemSchema, environmentSchema, environmentsSchema } from '@usebruno/schema';
|
||||
import { waitForNextTick } from 'utils/common';
|
||||
import { getDirectoryName, isWindowsOS } from 'utils/common/platform';
|
||||
import { getDirectoryName, isWindowsOS, PATH_SEPARATOR } from 'utils/common/platform';
|
||||
import { sendNetworkRequest, cancelNetworkRequest } from 'utils/network';
|
||||
|
||||
import {
|
||||
@ -46,8 +46,6 @@ import {
|
||||
import { closeAllCollectionTabs } from 'providers/ReduxStore/slices/tabs';
|
||||
import { resolveRequestFilename } from 'utils/common/platform';
|
||||
|
||||
const PATH_SEPARATOR = path.sep;
|
||||
|
||||
export const renameCollection = (newName, collectionUid) => (dispatch, getState) => {
|
||||
const state = getState();
|
||||
const collection = findCollectionByUid(state.collections.collections, collectionUid);
|
||||
|
@ -24,9 +24,7 @@ import {
|
||||
areItemsTheSameExceptSeqUpdate
|
||||
} from 'utils/collections';
|
||||
import { parseQueryParams, stringifyQueryParams } from 'utils/url';
|
||||
import { getSubdirectoriesFromRoot, getDirectoryName, isWindowsOS } from 'utils/common/platform';
|
||||
|
||||
const PATH_SEPARATOR = isWindowsOS() ? '\\' : '/';
|
||||
import { getSubdirectoriesFromRoot, getDirectoryName, PATH_SEPARATOR } from 'utils/common/platform';
|
||||
|
||||
const initialState = {
|
||||
collections: [],
|
||||
|
@ -48,3 +48,5 @@ export const isMacOS = () => {
|
||||
|
||||
return osFamily.includes('os x');
|
||||
};
|
||||
|
||||
export const PATH_SEPARATOR = isWindowsOS() ? '\\' : '/';
|
||||
|
Loading…
Reference in New Issue
Block a user