[IMP]:Minor Improvement for mac os also
bzr revid: atp@tinyerp.com-20110616071534-5afaug9db0e1112g
This commit is contained in:
parent
fc2bea8034
commit
8afb549a9d
Binary file not shown.
Binary file not shown.
|
@ -152,9 +152,6 @@ function getPredefinedFolder(type) {
|
||||||
getService(Components.interfaces.nsIProperties).get("Home", Components.interfaces.nsIFile);
|
getService(Components.interfaces.nsIProperties).get("Home", Components.interfaces.nsIFile);
|
||||||
var homeDir = dirService.path;
|
var homeDir = dirService.path;
|
||||||
var dir_path = ((homeDir.search(/\\/) != -1) ? homeDir + "\\" : homeDir + "/")
|
var dir_path = ((homeDir.search(/\\/) != -1) ? homeDir + "\\" : homeDir + "/")
|
||||||
if(navigator.userAgent.indexOf('Mac OS X')!= -1){
|
|
||||||
dir_path ="/tmp/"
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
var localFile = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
|
var localFile = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
|
||||||
localFile.initWithPath(dir_path);
|
localFile.initWithPath(dir_path);
|
||||||
|
|
|
@ -153,13 +153,6 @@ function searchmail()
|
||||||
name[i] = currentAttachments[i].displayName;
|
name[i] = currentAttachments[i].displayName;
|
||||||
var obj = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
|
var obj = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
|
||||||
obj.initWithPath(path)
|
obj.initWithPath(path)
|
||||||
if(navigator.userAgent.indexOf('Mac OS X')!= -1){
|
|
||||||
obj.initWithPath("/tmp/");
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
alert("Not Compatible for this Operating System");
|
|
||||||
false();
|
|
||||||
}
|
|
||||||
//saving the attachment files in system's temp folder
|
//saving the attachment files in system's temp folder
|
||||||
test[i] = messenger.saveAttachmentToFolder(contentType[i],url[i],name[i],uri,obj);
|
test[i] = messenger.saveAttachmentToFolder(contentType[i],url[i],name[i],uri,obj);
|
||||||
}
|
}
|
||||||
|
@ -338,9 +331,6 @@ function parse_eml(){
|
||||||
getService(Components.interfaces.nsIProperties).get("Home", Components.interfaces.nsIFile);
|
getService(Components.interfaces.nsIProperties).get("Home", Components.interfaces.nsIFile);
|
||||||
var homeDir = dirService.path;
|
var homeDir = dirService.path;
|
||||||
fpath = ((homeDir.search(/\\/) != -1) ? homeDir + "\\" : homeDir + "/")
|
fpath = ((homeDir.search(/\\/) != -1) ? homeDir + "\\" : homeDir + "/")
|
||||||
if(navigator.userAgent.indexOf('Mac OS X')!= -1){
|
|
||||||
fpath ="/tmp/"
|
|
||||||
}
|
|
||||||
name = fpath + getPref().getCharPref('fname') +".eml"
|
name = fpath + getPref().getCharPref('fname') +".eml"
|
||||||
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
|
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
|
||||||
file.initWithPath( name );
|
file.initWithPath( name );
|
||||||
|
|
Loading…
Reference in New Issue