DirectorySave: use Directory::GetName()

This commit is contained in:
Max Kellermann 2013-10-21 10:04:59 +02:00
parent c0421a57da
commit 7142c81c05

View File

@ -52,10 +52,7 @@ directory_save(FILE *fp, const Directory &directory)
Directory *cur;
directory_for_each_child(cur, directory) {
char *base = g_path_get_basename(cur->path);
fprintf(fp, DIRECTORY_DIR "%s\n", base);
g_free(base);
fprintf(fp, DIRECTORY_DIR "%s\n", cur->GetName());
directory_save(fp, *cur);