Accept strings in File.createDirectoryIfNecessary

This commit is contained in:
Sylvester Keil 2018-08-02 12:52:04 +02:00
parent e9e6a8313d
commit fc8037a83b
No known key found for this signature in database
GPG key ID: 878933BCEAB25A10

View file

@ -962,6 +962,7 @@ Zotero.File = new function(){
this.createDirectoryIfMissing = function (dir) {
dir = this.pathToFile(dir);
if (!dir.exists() || !dir.isDirectory()) {
if (dir.exists() && !dir.isDirectory()) {
dir.remove(null);