File incremental update for new version

This commit is contained in:
brunosimon
2016-08-11 21:57:07 +02:00
parent bdda23cc43
commit a73a484d2a
4 changed files with 37 additions and 21 deletions
+3 -5
View File
@@ -29,7 +29,8 @@ class Files
file = new File( {
name : parsed_path.base,
path : parsed_path.dir,
content: _content
content: _content,
socket : this.socket
} )
// Save
@@ -70,7 +71,7 @@ class Files
return false
}
update( _path, _content )
create_version( _path, _content )
{
// Set up
let normalized_path = paths.normalize( _path )
@@ -81,9 +82,6 @@ class Files
// Create version
file.create_version( _content )
// Emit
this.socket.emit( 'update_file', file.describe() )
return file
}