mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +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 we are using the default filename the directory
|
||||
* that we are creating the file in may not exist */
|
||||
char *current_def_dir;
|
||||
struct stat sb;
|
||||
|
||||
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);
|
||||
QDir current_def_dir = QFileInfo(current_default).absoluteDir();
|
||||
if (!current_def_dir.exists())
|
||||
current_def_dir.mkpath(current_def_dir.absolutePath());
|
||||
}
|
||||
save_dives(existing_filename);
|
||||
mark_divelist_changed(FALSE);
|
||||
|
|
Loading…
Add table
Reference in a new issue