Skip to content

Commit

Permalink
GitLab: don't backup files
Browse files Browse the repository at this point in the history
Version control makes this redundant.

For #733
  • Loading branch information
chasecaleb committed Oct 31, 2021
1 parent aa4d898 commit 317a090
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/actions/sync_backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,16 @@ export const pushBackup = (pathOrFileId, contents) => {
const client = getState().syncBackend.get('client');
switch (client.type) {
case 'Dropbox':
case 'GitLab':
case 'WebDAV':
client.createFile(`${pathOrFileId}.organice-bak`, contents);
break;
case 'Google Drive':
pathOrFileId = pathOrFileId.startsWith('/') ? pathOrFileId.substr(1) : pathOrFileId;
client.duplicateFile(pathOrFileId, (fileName) => `${fileName}.organice-bak`);
break;
case 'GitLab':
// No-op for GitLab, because the beauty of version control makes backup files redundant.
break;
default:
}
};
Expand Down

0 comments on commit 317a090

Please sign in to comment.