Skip to content

Commit 15a807e

Browse files
committed
fix: use zotero cli args to set dataDir
fixes: #73
1 parent 54ad99e commit 15a807e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/utils/zotero-runner.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ export class ZoteroRunner {
8383
) {
8484
return "";
8585
}
86-
if (line.includes("extensions.zotero.dataDir") && this.options.dataDir !== "") {
87-
return `user_pref("extensions.zotero.dataDir", "${this.options.dataDir}");`;
88-
}
8986
return line;
9087
});
9188
}
@@ -103,7 +100,11 @@ export class ZoteroRunner {
103100
// Build args
104101
let args: string[] = ["--purgecaches", "no-remote"];
105102
if (this.options.profilePath) {
106-
args.push("-profile", this.options.profilePath);
103+
args.push("-profile", resolve(this.options.profilePath));
104+
}
105+
if (this.options.dataDir) {
106+
// '--dataDir' required absolute path
107+
args.push("--dataDir", resolve(this.options.dataDir));
107108
}
108109
if (this.options.devtools) {
109110
args.push("--jsdebugger");

0 commit comments

Comments
 (0)