mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
b413fabce7
commit
f6981f0210
2 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue