diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/directory_save.c | 6 | ||||
-rw-r--r-- | src/directory_save.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/directory_save.c b/src/directory_save.c index 71a75f8a9..912e71e0e 100644 --- a/src/directory_save.c +++ b/src/directory_save.c @@ -42,9 +42,8 @@ directory_quark(void) } void -directory_save(FILE *fp, struct directory *directory) +directory_save(FILE *fp, const struct directory *directory) { - struct dirvec *children = &directory->children; size_t i; if (!directory_is_root(directory)) { @@ -55,8 +54,9 @@ directory_save(FILE *fp, struct directory *directory) directory_get_path(directory)); } + const struct dirvec *children = &directory->children; for (i = 0; i < children->nr; ++i) { - struct directory *cur = children->base[i]; + const struct directory *cur = children->base[i]; char *base = g_path_get_basename(cur->path); fprintf(fp, DIRECTORY_DIR "%s\n", base); diff --git a/src/directory_save.h b/src/directory_save.h index 626c99c73..2d0056830 100644 --- a/src/directory_save.h +++ b/src/directory_save.h @@ -28,7 +28,7 @@ struct directory; void -directory_save(FILE *fp, struct directory *directory); +directory_save(FILE *fp, const struct directory *directory); bool directory_load(FILE *fp, struct directory *directory, |