Skip to content

Commit

Permalink
Fix obvious initial problem with drive support
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgodbolt committed Nov 18, 2014
1 parent 91e5e7a commit 7593740
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fdc.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ define(['utils'], function (utils) {
side: -1,
notFound: 0,
flush: function () {
flusher();
if (flusher) flusher();
},
seek: function (track) {
this.seekOffset = track * 10 * 256;
Expand Down
5 changes: 4 additions & 1 deletion google-drive.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,16 @@ define(['jquery', 'utils', 'fdc'], function ($, utils, fdc) {
function makeDisc(fdc, data, fileId, editable) {
var flusher = null;
if (editable) {
console.log("Making editable disc");
flusher = _.debounce(function () {
save(fileId, data).then(function () {
console.log("Saved ok");
});
}, 2000);
} else {
console.log("Making read-only disc");
}
return baseSsd(fdc, data, editable, flusher);
return baseSsd(fdc, data, flusher);
}

self.load = function (fdc, fileId) {
Expand Down

0 comments on commit 7593740

Please sign in to comment.