Commit 5bae8caf authored by Timon Stampfli's avatar Timon Stampfli

implement backup strategy for fswatch

parent 7bd8cbc5
Pipeline #4941 failed with stages
in 1 minute and 6 seconds
......@@ -98,6 +98,8 @@ export async function createCppFile(store: Store, taskname: string) {
let workspace = getWorkspaceOrShowError(store).workspaceDir;
try {
await fs.writeFile(path.join(workspace, taskname + ".cpp"), "");
store.emitFsChange();
} catch (err) {
vscode.window.showErrorMessage("Couldn't create .cpp file");
throw new Error("Couldn't create .cpp file");
......@@ -114,6 +116,7 @@ export async function createSoitaskFile(store: Store, taskname: string) {
let workspace = getWorkspaceOrShowError(store).workspaceDir;
try {
await fs.writeFile(path.join(workspace, taskname + ".soitask"), "");
store.emitFsChange();
} catch (err) {
vscode.window.showErrorMessage("Couldn't create soitask file");
throw new Error("Couldn't create soitaskfile");
......
......@@ -145,5 +145,6 @@ export async function initializeWorkspace(store: Store) {
let workspace = await determineWorkspaceFolder();
if (workspace !== null) {
await determineWorkspaceSettings(store, workspace);
store.emitFsChange();
}
}
......@@ -131,5 +131,8 @@ export class Store {
this.emitAllSamplesChange();
})
);
setInterval(function(this: Store) {
this.emitFsChange();
}, 30000);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment