mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-15 21:04:46 +01:00
fix (error): error display when ls failed
This commit is contained in:
parent
2c926df4f6
commit
91b85779d6
3 changed files with 3 additions and 4 deletions
|
|
@ -29,9 +29,7 @@ class FileSystem {
|
|||
if (keep_pulling_from_http === false) return Promise.resolve();
|
||||
return fetch_from_http(_path);
|
||||
}).catch((err) => {
|
||||
if (cache === null) {
|
||||
this.obs && this.obs.error({ message: "Unknown Path" });
|
||||
}
|
||||
this.obs && this.obs.error(err);
|
||||
});
|
||||
};
|
||||
fetch_from_http(path);
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@ export class FilesPageComponent extends React.Component {
|
|||
this._cleanupListeners();
|
||||
const observer = Files.ls(path, this.state.show_hidden).subscribe((res) => {
|
||||
if (res.status !== "ok") {
|
||||
notify.send(res, "error");
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
|
|
|
|||
|
|
@ -254,6 +254,8 @@ func fromSambaErr(err error) error {
|
|||
switch {
|
||||
case os.IsPermission(err):
|
||||
return ErrPermissionDenied
|
||||
case os.IsNotExist(err):
|
||||
return ErrNotFound
|
||||
default:
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue