[Bbs2ch-cvs 292] [274] スキンの読み込み失敗時の回復が正しく動作していなかったのを修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2007年 12月 18日 (火) 22:04:42 JST


Revision: 274
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=bbs2ch&view=rev&rev=274
Author:   flyson
Date:     2007-12-18 22:04:42 +0900 (Tue, 18 Dec 2007)

Log Message:
-----------
スキンの読み込み失敗時の回復が正しく動作していなかったのを修正

Modified Paths:
--------------
    trunk/bbs2chreader/chrome/content/bbs2chreader/server/thread.js


-------------- next part --------------
Modified: trunk/bbs2chreader/chrome/content/bbs2chreader/server/thread.js
===================================================================
--- trunk/bbs2chreader/chrome/content/bbs2chreader/server/thread.js	2007-12-15 14:07:15 UTC (rev 273)
+++ trunk/bbs2chreader/chrome/content/bbs2chreader/server/thread.js	2007-12-18 13:04:42 UTC (rev 274)
@@ -134,7 +134,7 @@
 		try{
 			this.converter.init(this, this.dat.threadURL, this.dat.boardURL, this.dat.type);
 		}catch(ex){
-			if(ex.result == Components.results.NS_ERROR_FILE_NOT_FOUND){
+			if(ex == Components.results.NS_ERROR_FILE_NOT_FOUND){
 				var skinName = this._pref.getComplexValue("extensions.bbs2chreader.thread_skin",
 						Components.interfaces.nsISupportsString).data;
 				skinName = this._bbs2chService.toSJIS(skinName);
@@ -1172,23 +1172,16 @@
 		this._dd2Color.init();
 
 
-		var skinURISpec = "chrome://bbs2chreader/content/res/skin-default/";
-		var skinName = this._pref.getComplexValue("extensions.bbs2chreader.thread_skin",
-							Components.interfaces.nsISupportsString).data;
-		if(skinName != ""){
-			var skinDir = this._b2rService.io.getDataDir();
-			skinDir.appendRelativePath("skin");
-			var fileURL = this._ioService.newFileURI(skinDir)
-						.QueryInterface(Components.interfaces.nsIFileURL);
-			skinURISpec = fileURL.resolve(encodeURIComponent(skinName)) + "/";
-		}
-
 		this._tmpHeader   = this._bbs2chService.readFile(this._resolveSkinFile("Header.html").path);
 		this._tmpFooter   = this._bbs2chService.readFile(this._resolveSkinFile("Footer.html").path);
 		this._tmpRes	  = this._bbs2chService.readFile(this._resolveSkinFile("Res.html").path);
 		this._tmpNewRes	  = this._bbs2chService.readFile(this._resolveSkinFile("NewRes.html").path);
 		this._tmpNewMark  = this._bbs2chService.readFile(this._resolveSkinFile("NewMark.html").path);
 
+		if(this._tmpHeader===null || this._tmpFooter===null || this._tmpRes===null || this._tmpNewRes===null || this._tmpNewMark===null){
+			throw Components.results.NS_ERROR_FILE_NOT_FOUND
+		}
+
 			// Šî–{ƒXƒLƒ“ƒ^ƒO‚Ì’uŠ·
 		this._tmpHeader = this._replaceBaseTag(this._tmpHeader);
 		this._tmpFooter = this._replaceBaseTag(this._tmpFooter);


bbs2ch-cvs メーリングリストの案内
Back to archive index