Modify database and dialog

modify database and dialog to make the content of path field is only
path not include filename.