@@ -13,7 +13,7 @@ import {
13
13
import { PersistenceFile } from 'src/features/persistence/PersistenceTypes' ;
14
14
import classes from 'src/styles/FileSystemView.module.scss' ;
15
15
16
- import { isGDriveSyncing , isGithubSyncing , rmdirRecursively } from '../fileSystem/FileSystemUtils' ;
16
+ import { rmdirRecursively } from '../fileSystem/FileSystemUtils' ;
17
17
import { showSimpleConfirmDialog , showSimpleErrorDialog } from '../utils/DialogHelper' ;
18
18
import { removeEditorTabsForDirectory } from '../workspace/WorkspaceActions' ;
19
19
import { WorkspaceLocation } from '../workspace/WorkspaceTypes' ;
@@ -90,12 +90,8 @@ const FileSystemViewDirectoryNode: React.FC<Props> = ({
90
90
if ( ! shouldProceed ) {
91
91
return ;
92
92
}
93
- if ( isGDriveSyncing ( ) ) {
94
- dispatch ( persistenceDeleteFolder ( fullPath ) ) ;
95
- }
96
- if ( isGithubSyncing ( ) ) {
97
- dispatch ( githubDeleteFolder ( fullPath ) ) ;
98
- }
93
+ dispatch ( persistenceDeleteFolder ( fullPath ) ) ;
94
+ dispatch ( githubDeleteFolder ( fullPath ) ) ;
99
95
dispatch ( removeEditorTabsForDirectory ( workspaceLocation , fullPath ) ) ;
100
96
rmdirRecursively ( fileSystem , fullPath ) . then ( refreshParentDirectory ) ;
101
97
} ) ;
@@ -128,12 +124,8 @@ const FileSystemViewDirectoryNode: React.FC<Props> = ({
128
124
if ( err ) {
129
125
console . error ( err ) ;
130
126
}
131
- if ( isGDriveSyncing ( ) ) {
132
- dispatch ( persistenceCreateFile ( newFilePath ) ) ;
133
- }
134
- if ( isGithubSyncing ( ) ) {
135
- dispatch ( githubCreateFile ( newFilePath ) ) ;
136
- }
127
+ dispatch ( persistenceCreateFile ( newFilePath ) ) ;
128
+ dispatch ( githubCreateFile ( newFilePath ) ) ;
137
129
forceRefreshFileSystemViewList ( ) ;
138
130
} ) ;
139
131
} ) ;
@@ -163,24 +155,6 @@ const FileSystemViewDirectoryNode: React.FC<Props> = ({
163
155
}
164
156
165
157
dispatch ( persistenceCreateFolder ( newDirectoryPath ) ) ;
166
- // function informUserGithubCannotCreateFolder() {
167
- // return showSimpleConfirmDialog({
168
- // contents: (
169
- // <div>
170
- // <p>
171
- // Warning: Github is unable to create empty directories. When you create your first
172
- // file in this folder, Github will automatically sync this folder and the first
173
- // file.
174
- // </p>
175
- // <p>Please click 'Confirm' to continue.</p>
176
- // </div>
177
- // ),
178
- // positiveIntent: 'primary',
179
- // positiveLabel: 'Confirm'
180
- // });
181
- // }
182
- // informUserGithubCannotCreateFolder();
183
- // dispatch(enableFileSystemContextMenus());
184
158
forceRefreshFileSystemViewList ( ) ;
185
159
} ) ;
186
160
} ) ;
0 commit comments