Skip to content

Commit

Permalink
Change: Load data objects from new feed paths
Browse files Browse the repository at this point in the history
Merge pull request #1792 from jhelmold/new_feed_directory_structure

The data objects are now loaded from the new feed paths which
do no longer contain the version number and have renamed
subdirectories for each type.
  • Loading branch information
timopollmeier authored Mar 23, 2022
2 parents 0a769ec + b2d361b commit 51716c8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
3 changes: 1 addition & 2 deletions src/manage_configs.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ feed_dir_configs ()
static gchar *path = NULL;
if (path == NULL)
path = g_build_filename (GVMD_FEED_DIR,
GMP_VERSION_FEED,
"configs",
"scan-configs",
NULL);
return path;
}
Expand Down
13 changes: 6 additions & 7 deletions src/manage_migrators.c
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,6 @@ migrate_232_to_233_set_predefined (const gchar *type, const gchar *table)
gchar *dir_path;

dir_path = g_build_filename (GVMD_FEED_DIR,
GMP_VERSION_FEED,
type,
NULL);

Expand Down Expand Up @@ -2289,13 +2288,13 @@ migrate_232_to_233 ()
" WHERE id IN (SELECT resource FROM resources_predefined"
" WHERE resource_type = 'report_format');");

migrate_232_to_233_set_predefined ("report_formats", "report_formats");
migrate_232_to_233_set_predefined ("configs", "configs");
migrate_232_to_233_set_predefined ("port_lists", "port_lists");
migrate_232_to_233_set_predefined ("report-formats", "report_formats");
migrate_232_to_233_set_predefined ("scan-configs", "configs");
migrate_232_to_233_set_predefined ("port-lists", "port_lists");

migrate_232_to_233_set_predefined ("report_formats", "report_formats_trash");
migrate_232_to_233_set_predefined ("configs", "configs_trash");
migrate_232_to_233_set_predefined ("port_lists", "port_lists_trash");
migrate_232_to_233_set_predefined ("report-formats", "report_formats_trash");
migrate_232_to_233_set_predefined ("scan-configs", "configs_trash");
migrate_232_to_233_set_predefined ("port-lists", "port_lists_trash");

sql ("DROP TABLE resources_predefined;");

Expand Down
3 changes: 1 addition & 2 deletions src/manage_port_lists.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ feed_dir_port_lists ()
static gchar *path = NULL;
if (path == NULL)
path = g_build_filename (GVMD_FEED_DIR,
GMP_VERSION_FEED,
"port_lists",
"port-lists",
NULL);
return path;
}
Expand Down
5 changes: 2 additions & 3 deletions src/manage_report_formats.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,7 @@ feed_dir_report_formats ()
static gchar *path = NULL;
if (path == NULL)
path = g_build_filename (GVMD_FEED_DIR,
GMP_VERSION_FEED,
"report_formats",
"report-formats",
NULL);
return path;
}
Expand Down Expand Up @@ -867,4 +866,4 @@ should_sync_report_formats ()
return TRUE;

return FALSE;
}
}

0 comments on commit 51716c8

Please sign in to comment.