commit 89fc597aa42f945fcd124ae64accb2f1fc98877a
parent 63db2a4aaa8c66cb63b3e6302027d8217b236264
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 21 Jul 2011 23:01:13 +0000
nsIFile.isSpecial() is not implemented on Fx 3.6, but we can still use nsIFile.isFile() to determine whether or not this is a pipe. Ugh.
Diffstat:
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js
@@ -95,6 +95,7 @@ Zotero.Integration = new function() {
} catch (e) {
// if pipe can't be deleted, log an error
Zotero.debug("Error removing old integration pipe", 1);
+ Zotero.logError(e);
Components.utils.reportError(
"Zotero word processor integration initialization failed. "
+ "See http://forums.zotero.org/discussion/12054/#Item_10 "
diff --git a/chrome/content/zotero/xpcom/ipc.js b/chrome/content/zotero/xpcom/ipc.js
@@ -99,7 +99,7 @@ Zotero.IPC = new function() {
// Also append to plain files to get things working with Fx 3.6 polling
// On OS X, O_APPEND = 0x0008
// On Linux, O_APPEND = 00002000
- if(!pipe.isSpecial()) mode = mode | (Zotero.isMac ? 0x0008 : 00002000);
+ if(pipe.isFile()) mode = mode | (Zotero.isMac ? 0x0008 : 00002000);
var fd = open(pipe.path, mode);
if(fd === -1) return false;
@@ -222,9 +222,9 @@ Zotero.IPC = new function() {
var defunct = false;
- if(!pipe.isSpecial()) {
+ if(pipe.isFile()) {
// not actually a pipe
- if(!pipe.isFile()) {
+ if(pipe.isDirectory()) {
// not a file, so definitely defunct
defunct = true;
} else {
@@ -523,7 +523,8 @@ Zotero.IPC.Pipe.Poll = function(file, callback) {
Zotero.IPC.Pipe.Poll._activePipes.push(this);
// add shutdown listener
- Zotero.addShutdownListener(this);
+ var me = this;
+ Zotero.addShutdownListener(function() { me._clearFile() });
}
Zotero.IPC.Pipe.Poll._activePipes = [];