I am updating one of the extensions that I have created and, when I run it through the online validator, it gives me the “Extension Test” warning below:
Reference to critical user profile data
Signing severity: low
Warning:
Critical files in the user profile should not be directly accessed by
add-ons. In many cases, an equivalent API is available and should be used instead.
Can someone, please, clear up what this is saying. My extension does save files to the user’s TEMP directory (as specified by TmpD) but it removes then when finished. The 2 lines of code reported are:
Components.classes["@mozilla.org/storage/service;1"]
.getService(Components.interfaces.mozIStorageService);
and
Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties)
.get(“TmpD”,Components.interfaces.nsIFile);
If TmpD isn’t the right place then where should I be saving the files? Any help would be appreciated. Thank you. - Mr T