This commit is contained in:
Antelle 2015-12-13 23:03:29 +03:00
parent 7d4c607029
commit 2f86ff8502
3 changed files with 5 additions and 4 deletions

View File

@ -360,13 +360,14 @@ var AppModel = Backbone.Model.extend({
logger.info('Save loaded file to cache');
Storage.cache.save(cacheId, params.fileData);
}
that.addToLastOpenFiles(file, params.rev);
var rev = params.rev || fileInfo && fileInfo.get('rev');
that.addToLastOpenFiles(file, rev);
that.addFile(file);
});
},
addToLastOpenFiles: function(file, rev) {
this.appLogger.debug('Add last open file', file.get('cacheId'), file.get('name'), file.get('storage'), file.get('path'));
this.appLogger.debug('Add last open file', file.get('cacheId'), file.get('name'), file.get('storage'), file.get('path'), rev);
var dt = new Date();
var fileInfo = new FileInfoModel({
id: file.get('cacheId'),

View File

@ -40,7 +40,7 @@ var StorageDropbox = {
logger.debug('Stat', path);
var ts = logger.ts();
DropboxLink.stat(path, function(err, stat) {
if (stat.isRemoved) {
if (stat && stat.isRemoved) {
err = new Error('File removed');
err.notFound = true;
}

View File

@ -7,7 +7,7 @@
<p>This file is opened from Dropbox.</p>
<% } %>
<% } else { %>
<p>This file is stored in browser.</p>
<p>This file is stored in internal app storage.</p>
<% if (!supportFiles) { %>
<p>Want to work seamlessly with local files? <a href="<%= desktopLink %>" target="_blank">Download a desktop app</a></p>
<% } %>