【发布时间】:2014-03-05 14:46:50
【问题描述】:
我正在开发自己的 Thunderbird 扩展程序。 该扩展添加了一个 .xml 文件作为 Thunderbird 邮件的附件(效果很好)。 我唯一的问题是我不知道如何使用相对路径。
看起来像这样:
var file= 'C:\\...[… \\…]...\\chrome\\VHitG2.xml';
var attachments = [];
attachments.push(FileToAttachment(file));
AddAttachments(attachments);
如果扩展安装在不同的路径中,扩展将无法工作。
有谁知道如何使用相对路径?
【问题讨论】:
-
相对于什么?该文件是您的扩展包的一部分吗?
-
是的,它是我扩展的一部分。会被其他人使用,所以 Thunderbird 的安装路径会有所不同。
标签: javascript thunderbird thunderbird-addon