Fix merge document dialog used user preference over action path, even if it was missing

This commit is contained in:
nathan 2024-12-20 08:37:08 -07:00
parent 946b0a5e43
commit fd52a2fee5

View File

@ -927,6 +927,7 @@ export abstract class EgwApp
options : { [p : string] : string | boolean }
}>
{
// Check path from action and user's preferred path
let path = action?.data?.merge_data?.directory ?? "";
let dirPref = <string>this.egw.preference('document_dir', this.appname) ?? "";
let dirs = dirPref.split('/[,\s]+\//');
@ -937,6 +938,9 @@ export abstract class EgwApp
d = "/" + d;
}
});
dirs.push(path);
dirs = dirs.filter((d, index, array) => (d && array.indexOf(d) === index));
let fileSelect = <Et2MergeDialog><unknown>loadWebComponent('et2-merge-dialog', {
application: this.appname,
path: dirs.pop() || ""