Skip to content

Commit

Permalink
fix: restore always uses ~/Downloads path
Browse files Browse the repository at this point in the history
  • Loading branch information
garethgeorge committed Jul 2, 2024
1 parent 76ce3c1 commit 955771e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
24 changes: 11 additions & 13 deletions webui/src/components/SnapshotBrowser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ import {
FolderOutlined,
} from "@ant-design/icons";
import { useShowModal } from "./ModalManager";
import {
formatBytes,
formatDate,
formatTime,
normalizeSnapshotId,
} from "../lib/formatting";
import { formatBytes, normalizeSnapshotId } from "../lib/formatting";
import { URIAutocomplete } from "./URIAutocomplete";
import { validateForm } from "../lib/formutil";
import { backrestService } from "../api";
Expand Down Expand Up @@ -254,13 +249,15 @@ const RestoreModal = ({
const handleOk = async () => {
try {
const values = await validateForm(form);
await backrestService.restore({
repoId,
planId,
snapshotId,
path,
target: values.target,
});
await backrestService.restore(
new RestoreSnapshotRequest({
repoId,
planId,
snapshotId,
path,
target: values.target,
})
);
} catch (e: any) {
alert("Failed to restore snapshot: " + e.message);
} finally {
Expand Down Expand Up @@ -307,6 +304,7 @@ const RestoreModal = ({
form.setFields([
{
name: "target",
value: targetPath,
errors: [],
},
]);
Expand Down
7 changes: 5 additions & 2 deletions webui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
}
},
"include": [
"src/**/*"
],
}

0 comments on commit 955771e

Please sign in to comment.