Add helper function to create a directory

Yes, this could easily done from the C code. But this seems just so much
easier and I don't have to worry about the oddities of Windows and all
that.

I'm lazy. So sue me.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-06-13 18:25:36 -07:00
parent b413fabce7
commit f6981f0210
2 changed files with 8 additions and 0 deletions

View file

@ -1073,3 +1073,10 @@ extern "C" void updateWindowTitle()
{
MainWindow::instance()->setTitle();
}
extern "C" void subsurface_mkdir(const char *dir)
{
QDir directory;
if (!directory.mkpath(QString(dir)))
qDebug() << "failed to create path" << dir;
}

View file

@ -5,5 +5,6 @@ bool getProxyString(char **buffer);
bool canReachCloudServer();
void updateWindowTitle();
bool isCloudUrl(const char *filename);
void subsurface_mkdir(const char *dir);
#endif // QTHELPERFROMC_H