Skip to content

Commit 28285c9

Browse files
committed
Change default file to /proj/program.js; Add try catch finally blocks to instant sync for GDrive
1 parent a38e838 commit 28285c9

File tree

4 files changed

+206
-177
lines changed

4 files changed

+206
-177
lines changed

src/commons/application/ApplicationTypes.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,11 @@ export const createDefaultWorkspace = (workspaceLocation: WorkspaceLocation): Wo
401401
});
402402

403403
const defaultFileName = 'program.js';
404+
const defaultTopLevelFolderName = 'proj';
404405
export const getDefaultFilePath = (workspaceLocation: WorkspaceLocation) =>
405-
`${WORKSPACE_BASE_PATHS[workspaceLocation]}/${defaultFileName}`;
406+
`${WORKSPACE_BASE_PATHS[workspaceLocation]}/${defaultTopLevelFolderName}/${defaultFileName}`;
406407

407-
export const defaultWorkspaceManager: WorkspaceManagerState = { // TODO default
408+
export const defaultWorkspaceManager: WorkspaceManagerState = {
408409
assessment: {
409410
...createDefaultWorkspace('assessment'),
410411
currentAssessment: undefined,

src/commons/fileSystem/FileSystemReducer.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,6 @@ export const FileSystemReducer: Reducer<FileSystemState, SourceActionType> = cre
104104
})
105105
.addCase(updatePersistenceFolderPathAndNameByPath, (state, action) => {
106106
const filesState = state['persistenceFileArray'];
107-
//const persistenceFileFindIndex = filesState.findIndex(e => e.path === action.payload.oldPath);
108-
console.log(action.payload);
109-
filesState.forEach(e => console.log(e.path));
110-
// if (persistenceFileFindIndex === -1) {
111-
// return;
112-
// }
113107
// get current level of folder
114108
const regexResult = /^(.*[\\\/])?(\.*.*?)(\.[^.]+?|)$/.exec(action.payload.newPath)!;
115109

0 commit comments

Comments
 (0)