adds PATH_SEPARATOR constant

This commit is contained in:
Jack Scotson 2023-10-14 16:32:29 +01:00
parent 9ca22cd1d1
commit b07ccbdfab
3 changed files with 4 additions and 6 deletions

View File

@ -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);

View File

@ -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: [],

View File

@ -48,3 +48,5 @@ export const isMacOS = () => {
return osFamily.includes('os x');
};
export const PATH_SEPARATOR = isWindowsOS() ? '\\' : '/';