File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -116,13 +116,24 @@ export default class EventsListener {
116116 }
117117
118118 private isSyncable ( filePath : string ) {
119- return (
120- filePath === `${ this . vault . configDir } /github-sync-metadata.json` ||
121- ( this . settings . syncConfigDir &&
122- filePath . startsWith ( this . vault . configDir ) ) ||
123- // Obsidian recommends not syncing the workspace files
119+ if ( filePath === `${ this . vault . configDir } /github-sync-metadata.json` ) {
120+ // Manifest file must always be synced
121+ return true ;
122+ } else if (
124123 filePath === `${ this . vault . configDir } /workspace.json` ||
125124 filePath === `${ this . vault . configDir } /workspace-mobile.json`
126- ) ;
125+ ) {
126+ // Obsidian recommends not syncing the workspace files
127+ return false ;
128+ } else if (
129+ this . settings . syncConfigDir &&
130+ filePath . startsWith ( this . vault . configDir )
131+ ) {
132+ // Sync configs only if the user explicitly wants to
133+ return true ;
134+ } else {
135+ // All other files can be synced
136+ return true ;
137+ }
127138 }
128139}
You can’t perform that action at this time.
0 commit comments