martyr-deepin / deepin-screenshot

Deprecated (migrated into deepin-screen-recorder after v20), consider create and maintain your own fork if you love it.
https://www.deepin.org/original/deepin-screenshot/
GNU General Public License v3.0
346 stars 102 forks source link

fix: check path existence #55

Closed BLumia closed 5 years ago

BLumia commented 5 years ago

Fix https://github.com/linuxdeepin/deepin-screenshot/issues/54

from: QStandardPaths::writableLocation:

Note: The storage location returned can be a directory that does not exist; i.e., it may need to be created by the system or the user.

For linux, QStandardPath read the ~/.config/user-dirs.dirs to get the QStandardPaths::DesktopLocation path and the returned path may not exist, so we need manually check / create the path first.