summaryrefslogtreecommitdiffstats
path: root/src/ufo-roof-read-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ufo-roof-read-file.c')
-rw-r--r--src/ufo-roof-read-file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ufo-roof-read-file.c b/src/ufo-roof-read-file.c
index a5eb69b..4ee11c6 100644
--- a/src/ufo-roof-read-file.c
+++ b/src/ufo-roof-read-file.c
@@ -55,7 +55,7 @@ static guint ufo_roof_read_file(UfoRoofReadInterface *iface, uint8_t *buffers, G
}
-UfoRoofReadInterface *ufo_roof_read_file_new(UfoRoofConfig *cfg, guint id, GError **error) {
+UfoRoofReadInterface *ufo_roof_read_file_new(UfoRoofConfig *cfg, const char *path, guint file_id, GError **error) {
UfoRoofReadFile *reader = (UfoRoofReadFile*)calloc(1, sizeof(UfoRoofReadFile));
if (!reader) roof_new_error(error, "Can't allocate UfoRoofReadFile");
@@ -67,7 +67,7 @@ UfoRoofReadInterface *ufo_roof_read_file_new(UfoRoofConfig *cfg, guint id, GErro
reader->iface.close = ufo_roof_read_file_free;
reader->iface.read =ufo_roof_read_file;
- reader->fname = g_strdup_printf(cfg->path, id + cfg->first_file_number);
+ reader->fname = g_strdup_printf(path, file_id);
if (!reader->fname) {
free(reader);
roof_new_error(error, "Can't build file name");
@@ -77,7 +77,7 @@ UfoRoofReadInterface *ufo_roof_read_file_new(UfoRoofConfig *cfg, guint id, GErro
if (!reader->fd) {
g_free(reader->fname);
g_free(reader);
- roof_new_error(error, "Can't open file %s", reader->fname);
+ roof_new_error(error, "Can't open file %i at path %s", file_id, path);
}
return (UfoRoofReadInterface*)reader;