From 124bb9880a236610e933bfa8f3d3bdc94cf6395f Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 23 Jan 2017 11:10:00 +0000 Subject: [PATCH] Include flag in fileAdded event for readonly files --- src/app/files.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/files.js b/src/app/files.js index afb29d856f..945a77351f 100644 --- a/src/app/files.js +++ b/src/app/files.js @@ -45,7 +45,7 @@ function Files (storage) { return false } if (!exists) { - event.trigger('fileAdded', [path]) + event.trigger('fileAdded', [path, false]) } else { event.trigger('fileChanged', [path]) } @@ -58,7 +58,7 @@ function Files (storage) { this.addReadOnly = function (path, content) { if (!storage.exists(path)) { readonly[path] = content - event.trigger('fileAdded', [path]) + event.trigger('fileAdded', [path, true]) return true }