How to handle if standard path not available on linux?
Deleted 'Music'(~/Music) folder on linux. When I try to find music standard location from qt apis( statndard paths:: standard location), returns home directory.
How will application know standard path doesn't exist?
I'm not really sure to understand your question correctly. Since you deleted the Music folder, then AFAIK the new "standard" path is the home directory.
I thought it would return error or empty string.
Just to confirm: If standard path of music directory is home directory, then there is no music directory on that computer.
No, you can't presume that. Your user might have put his music in another path called e.g. Audio or my_music or even things.
If your application should find the music from a user, use the standard path as default and let the user modify the path in order to accommodate unusual folders.