Fixed: #3382 Too long file path breaks dialog filename

Possible fix for #3382.