@electerm/electerm-react 1.37.36 → 1.37.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,11 @@
6
6
  */
7
7
 
8
8
  export default (basePath, nameOrDot) => {
9
- const sep = basePath.includes('\\') || basePath.includes(':\\') || /^[a-z]+:$/i.test(basePath)
9
+ const sep = (basePath.includes('\\') ||
10
+ basePath.includes(':\\') ||
11
+ /^[a-z]+:$/i.test(basePath) ||
12
+ /^[a-z]+:$/i.test(nameOrDot)
13
+ )
10
14
  ? '\\'
11
15
  : '/'
12
16
  if (nameOrDot === '..') {
@@ -18,12 +22,15 @@ export default (basePath, nameOrDot) => {
18
22
  const res = arr.slice(0, length - 1).join(sep)
19
23
  return res || '/'
20
24
  }
21
- const pre = nameOrDot.includes(':\\') && basePath === '/'
25
+ const pre = (nameOrDot.includes(':\\') || /^[a-z]+:$/i.test(nameOrDot)) && basePath === '/'
22
26
  ? ''
23
27
  : basePath
24
- return pre +
25
- (basePath.endsWith(sep) ? '' : sep) +
26
- nameOrDot
28
+ const mid = (basePath.endsWith(sep) ? '' : sep)
29
+ let ff = pre + mid + nameOrDot
30
+ if (/^\\[a-z]+:$/i.test(ff)) {
31
+ ff = ff.slice(1)
32
+ }
33
+ return ff
27
34
  }
28
35
 
29
36
  export const osResolve = (...args) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "1.37.36",
3
+ "version": "1.37.38",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",