Commit 8cf3f138 by Masaru Abe

#17118 FileSystemAPIでエラー

parent 82c717a5
......@@ -471,7 +471,28 @@ CONTENTVIEW_FILESYSTEM.deleteMovieCache = function(fileName) {
};
CONTENTVIEW_FILESYSTEM.clearCache = function() {
if (!CONTENTVIEW_FILESYSTEM.fs) {
return;
}
CONTENTVIEW_FILESYSTEM.fs.root.getDirectory(
'/abook',
{},
function(dirEntry) {
dirEntry.removeRecursively(
function() {
//例外時に呼ばれるので以降fs無効化する
CONTENTVIEW_FILESYSTEM.fs = null;
},
null
);
},
null
);
};
CONTENTVIEW_FILESYSTEM.errorHandler = function(e) {
var msg = '';
......@@ -492,12 +513,17 @@ CONTENTVIEW_FILESYSTEM.errorHandler = function(e) {
msg = 'INVALID_STATE_ERR';
break;
default:
msg = 'Unknown Error';
msg = 'Unknown Error:' + e.code;
break;
};
//CONTENTVIEW_FILESYSTEM.fs = null;
//AVWEB.avwLog('FileSystemAPI Error: ' + msg);
//FileSystemのキャッシュクリア
CONTENTVIEW_FILESYSTEM.clearCache();
alert('FileSystemAPI Error: ' + msg);
};
$(function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment