Skip to content

Commit d7df17a

Browse files
committed
don't show unknown encoding modal for dot files (ex .vimrc)
1 parent a3acd56 commit d7df17a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

client/assets/js/Controller/Editor.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,10 @@ EditorController.prototype.post_file_load = function(){
212212
this.editor_view.getSession().setValue(this.file.data, -1);
213213

214214
// If its a saved file which isn't known to the app or to the user, then we warn him
215+
// Also the filename must not be equal to the extension (handling cases like .bashrc, .vimrc, etc)
215216
if(
216217
this.file.persisted &&
218+
this.file.title != this.file.extension() &&
217219
!extensions.find({ key: 'name', value: this.file.extension() }) &&
218220
!ArrayPreference.find("user_extensions").array.includes(this.file.extension())
219221
){

0 commit comments

Comments
 (0)