3

Every time I launch application, mkpath is called as if the directory was not created previously despite I always get 'path created' log. Do I need to specify any special privileges to save into the internal storage? mypath looks like /data/data/org.qtproject.example.WierszeApp/files/.local/share/libWierszeApp.so/

QDir mypath(QStandardPaths::writableLocation(QStandardPaths::DataLocation));

if(!mypath.cd("images"))
{
    if(mypath.mkpath("images"))
        qDebug() << "path created";
    else
        qDebug() << "path not created";
}
else
{
    qDebug() << "inside dir";
}
Nadarian
  • 962
  • 9
  • 22
  • 1
    Does adding `android.permission.WRITE_EXTERNAL_STORAGE` to the 'Permissions' field of the manifest file solve the problem? – Nejat Jul 03 '14 at 05:10

1 Answers1

3

I figured out why it appeared to not be created every time. Each time I run application from QtCreator libWierszeApp.so folder was deleted, so was the content. When you run app from the device everything works fine. I think it can be reported as bug.

Nadarian
  • 962
  • 9
  • 22