Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Commit

Permalink
fix/whm_path_seperator: resolve path separator issue (#328)
Browse files Browse the repository at this point in the history
Resolved path separator issue on upload
  • Loading branch information
Shankar authored and hitman401 committed Nov 30, 2017
1 parent efad8f1 commit ab1b367
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web_hosting_manager/app/safenet_comm/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ export const parseNetworkPath = (nwPath) => {
file: undefined,
};
if (nwPath) {
const sep = path.sep;
const sep = '/';
if (path.sep === '\\') {
const regx = new RegExp(/\\/,'g');
nwPath = nwPath.replace(regx, sep);
}
const splitPath = nwPath.split(sep);
result.dir = splitPath.slice(0, 3).join(sep);
result.file = splitPath.slice(3).join(sep) || path.basename(nwPath);
Expand Down

0 comments on commit ab1b367

Please sign in to comment.