From 03e760560aa77aa4f29de0610f41b547ac43ed00 Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Wed, 28 Nov 2007 14:22:39 -0800 Subject: [PATCH] Partially revert metadata format changes in 6c94114148c4. On second thought, the renaming of the "name:" field to "path:" isn't worth the trouble of making the change since there isn't much benefit and updating tools to deal with either format will be more complex. The other changes can be left since they are smaller and easier to support. Revert this now, before any releases are made with the change in effect. --- metadata.cc | 2 +- scandir.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata.cc b/metadata.cc index 2517d73..86d02aa 100644 --- a/metadata.cc +++ b/metadata.cc @@ -162,7 +162,7 @@ bool MetadataWriter::find(const string& path) { const char *path_str = path.c_str(); while (!old_metadata_eof) { - string old_path = uri_decode(old_metadata["path"]); + string old_path = uri_decode(old_metadata["name"]); int cmp = pathcmp(old_path.c_str(), path_str); if (cmp == 0) { found_match = true; diff --git a/scandir.cc b/scandir.cc index d39029c..7c940f5 100644 --- a/scandir.cc +++ b/scandir.cc @@ -251,7 +251,7 @@ void dump_inode(const string& path, // Path within snapshot metawriter->find(path); - file_info["path"] = uri_encode(path); + file_info["name"] = uri_encode(path); file_info["mode"] = encode_int(stat_buf.st_mode & 07777, 8); file_info["ctime"] = encode_int(stat_buf.st_ctime); file_info["mtime"] = encode_int(stat_buf.st_mtime); -- 2.20.1