How to handle if standard path not available on linux?



  • Hi,

    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?

    Thanks.


  • Lifetime Qt Champion

    Hi,

    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.



  • Hi SGaist,

    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.

    Thank you.


  • Lifetime Qt Champion

    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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.