115451, 115154 - Can't close save file progress dialog, directory created with wrong permissions

Ensure correct permissions are used when creating a directory for attached files when saving a document, and that we don't try to create a new directory when one exists.
Also, null check webBrowserPersist in case it does not exist.
r=bz for 115154, sr=hyatt/blake
This commit is contained in:
ben%netscape.com 2001-12-17 22:52:40 +00:00
Родитель 0ec3f045d8
Коммит c5fa15c704
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -400,7 +400,8 @@ function onLoad() {
filesFolder.leafName = filesFolderLeafName;
filesFolder.create(lfIID.DIRECTORY_TYPE, 0644);
if (!filesFolder.exists())
filesFolder.create(lfIID.DIRECTORY_TYPE, 0755);
webBrowserPersist.saveDocument(persistArgs.source, targetFile, filesFolder);
}
}
@ -456,7 +457,7 @@ function onCancel ()
catch( exception ) {}
}
else
else if (webBrowserPersist)
{
webBrowserPersist.cancelSave();
}