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.
This commit is contained in:
parent
63db2a4aaa
commit
89fc597aa4
|
@ -95,6 +95,7 @@ Zotero.Integration = new function() {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// if pipe can't be deleted, log an error
|
// if pipe can't be deleted, log an error
|
||||||
Zotero.debug("Error removing old integration pipe", 1);
|
Zotero.debug("Error removing old integration pipe", 1);
|
||||||
|
Zotero.logError(e);
|
||||||
Components.utils.reportError(
|
Components.utils.reportError(
|
||||||
"Zotero word processor integration initialization failed. "
|
"Zotero word processor integration initialization failed. "
|
||||||
+ "See http://forums.zotero.org/discussion/12054/#Item_10 "
|
+ "See http://forums.zotero.org/discussion/12054/#Item_10 "
|
||||||
|
|
|
@ -99,7 +99,7 @@ Zotero.IPC = new function() {
|
||||||
// Also append to plain files to get things working with Fx 3.6 polling
|
// Also append to plain files to get things working with Fx 3.6 polling
|
||||||
// On OS X, O_APPEND = 0x0008
|
// On OS X, O_APPEND = 0x0008
|
||||||
// On Linux, O_APPEND = 00002000
|
// 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);
|
var fd = open(pipe.path, mode);
|
||||||
if(fd === -1) return false;
|
if(fd === -1) return false;
|
||||||
|
@ -222,9 +222,9 @@ Zotero.IPC = new function() {
|
||||||
|
|
||||||
var defunct = false;
|
var defunct = false;
|
||||||
|
|
||||||
if(!pipe.isSpecial()) {
|
if(pipe.isFile()) {
|
||||||
// not actually a pipe
|
// not actually a pipe
|
||||||
if(!pipe.isFile()) {
|
if(pipe.isDirectory()) {
|
||||||
// not a file, so definitely defunct
|
// not a file, so definitely defunct
|
||||||
defunct = true;
|
defunct = true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -523,7 +523,8 @@ Zotero.IPC.Pipe.Poll = function(file, callback) {
|
||||||
Zotero.IPC.Pipe.Poll._activePipes.push(this);
|
Zotero.IPC.Pipe.Poll._activePipes.push(this);
|
||||||
|
|
||||||
// add shutdown listener
|
// add shutdown listener
|
||||||
Zotero.addShutdownListener(this);
|
var me = this;
|
||||||
|
Zotero.addShutdownListener(function() { me._clearFile() });
|
||||||
}
|
}
|
||||||
Zotero.IPC.Pipe.Poll._activePipes = [];
|
Zotero.IPC.Pipe.Poll._activePipes = [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user