fix: do not expose the name of the root directory
parent
0474e40877
commit
20e2a27bb0
|
@ -88,7 +88,7 @@ func NewFileInfo(opts *FileOptions) (*FileInfo, error) {
|
||||||
|
|
||||||
// Do not expose the name of root directory.
|
// Do not expose the name of root directory.
|
||||||
if file.Path == "/" {
|
if file.Path == "/" {
|
||||||
file.Name = "/"
|
file.Name = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
if opts.Expand {
|
if opts.Expand {
|
||||||
|
|
|
@ -150,7 +150,7 @@ const fetchData = async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
fileStore.updateRequest(res);
|
fileStore.updateRequest(res);
|
||||||
document.title = `${res.name} - ${t("files.files")} - ${name}`;
|
document.title = `${res.name || t("sidebar.myFiles")} - ${t("files.files")} - ${name}`;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof Error) {
|
if (err instanceof Error) {
|
||||||
error.value = err;
|
error.value = err;
|
||||||
|
|
Loading…
Reference in New Issue