mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Replace glib file/directory handling with equivalent Qt code
I hope this is indeed equivalent... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
25b8092c03
commit
f67d3d4bbc
1 changed files with 3 additions and 8 deletions
|
@ -521,14 +521,9 @@ void MainWindow::file_save(void)
|
||||||
if (strcmp(existing_filename, current_default) == 0) {
|
if (strcmp(existing_filename, current_default) == 0) {
|
||||||
/* if we are using the default filename the directory
|
/* if we are using the default filename the directory
|
||||||
* that we are creating the file in may not exist */
|
* that we are creating the file in may not exist */
|
||||||
char *current_def_dir;
|
QDir current_def_dir = QFileInfo(current_default).absoluteDir();
|
||||||
struct stat sb;
|
if (!current_def_dir.exists())
|
||||||
|
current_def_dir.mkpath(current_def_dir.absolutePath());
|
||||||
current_def_dir = g_path_get_dirname(existing_filename);
|
|
||||||
if (stat(current_def_dir, &sb) != 0) {
|
|
||||||
g_mkdir(current_def_dir, S_IRWXU);
|
|
||||||
}
|
|
||||||
free(current_def_dir);
|
|
||||||
}
|
}
|
||||||
save_dives(existing_filename);
|
save_dives(existing_filename);
|
||||||
mark_divelist_changed(FALSE);
|
mark_divelist_changed(FALSE);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue