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
2 changed files with 6 additions and 4 deletions
|
@ -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 "
|
||||
|
|
|
@ -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 = [];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue