Include flag in fileAdded event for readonly files

pull/1/head
Alex Beregszaszi 8 years ago
parent abeccd51e7
commit 124bb9880a
  1. 4
      src/app/files.js

@ -45,7 +45,7 @@ function Files (storage) {
return false return false
} }
if (!exists) { if (!exists) {
event.trigger('fileAdded', [path]) event.trigger('fileAdded', [path, false])
} else { } else {
event.trigger('fileChanged', [path]) event.trigger('fileChanged', [path])
} }
@ -58,7 +58,7 @@ function Files (storage) {
this.addReadOnly = function (path, content) { this.addReadOnly = function (path, content) {
if (!storage.exists(path)) { if (!storage.exists(path)) {
readonly[path] = content readonly[path] = content
event.trigger('fileAdded', [path]) event.trigger('fileAdded', [path, true])
return true return true
} }

Loading…
Cancel
Save