Documents:fix adding files with dialogs