<div dir="ltr"><div><div><div>Hi all,<br></div>I have some functions for writing/reading files written in c++<br></div>I want to use the  XDG Base Directory Specification but i don't know how to use it.<br><br></div><div>For example at the moment i have the directory set like this:<br><br>    QDir dir("/home/nemo/.local/share/harbour-sailtris");<br>    if (!dir.exists())<br>        dir.mkpath(".");<br>    QDir::setCurrent("/home/nemo/.local/share/harbour-sailtris");<br><br></div><div>if i use <b><tt>$XDG_DATA_HOME </tt></b>instead of "/home/nemo/.local/share/"<br></div><div>it creates a directory  <b><tt>$XDG_DATA_HOME </tt></b>in /home/nemo/ and the path is not absolute, so each time the function is called it enters the previous directory<br><br></div><div>Someone can explain to me how this works? :)<span class=""></span><span class=""></span><br></div><b><tt></tt></b></div>