fix(xo-web/file-restore): ensure folder path trailing slash (#3446)
This commit is contained in:
parent
99e6d54647
commit
4147800266
@ -6,6 +6,8 @@
|
||||
|
||||
### Bug fixes
|
||||
|
||||
[File restore] Fix a path issue when going back to the parent folder (PR [#3446](https://github.com/vatesfr/xen-orchestra/pull/3446))
|
||||
|
||||
### Released packages
|
||||
|
||||
- xo-server v5.28.0
|
||||
|
@ -46,6 +46,8 @@ const fileOptionRenderer = ({ isFile, name }) => (
|
||||
</span>
|
||||
)
|
||||
|
||||
const ensureTrailingSlash = path => path + (endsWith(path, '/') ? '' : '/')
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
const formatFilesOptions = (rawFiles, path) => {
|
||||
@ -56,7 +58,7 @@ const formatFilesOptions = (rawFiles, path) => {
|
||||
id: '..',
|
||||
isFile: false,
|
||||
name: '..',
|
||||
path: dirname(path),
|
||||
path: ensureTrailingSlash(dirname(path)),
|
||||
},
|
||||
]
|
||||
: []
|
||||
|
Loading…
Reference in New Issue
Block a user