importDataObject() will not attach file using a path until it is run without a path first (Windows)
I have the following in a document-level javascript:
//Refresh JSON file attachment
function reload_equipment_list(attachment_name, full_path) {
if (this.dataObjects != null) {
//Delete the existing equipment list
this.removeDataObject(attachment_name);
}
//Import the new equipment list
this.importDataObject(attachment_name, full_path); //automatic form
//this.importDataObject(attachment_name); //manual form
}
On Windows, this line (which I'm calling the automatic form) fails:
this.importDataObject(attachment_name, full_path);I don't get an error message in the console or anything, the function just refuses to import the file.
If I use this form, (which I'm calling the manual form):
this.importDataObject(attachment_name);It allows me to choose the file I want. Once I run this form at least once, the automatic form will suddenly start to work. It's almost like the function doesn't have permission to access the file directory until the manual form is run.
If you re-open the document, the behavior resets. You have to run the manual form once for it to behave as expected. This is not the case on Mac. The automatic form works on startup without having to run the manual form.
I would like to know if this is a bug or if there is some setting in the Windows version I'm missing.
