summary refs log tree commit diff
path: root/ripple/fossil/src/bin
diff options
context:
space:
mode:
authoredef <edef@unfathomable.blue>2022-04-10 23:29:51 +0000
committeredef <edef@unfathomable.blue>2022-04-10 23:41:35 +0000
commit62e3cac7747f6660d2b43ed5c21be8ab584dff5d (patch)
tree998870ce46fbea2d89ad9dbe8cecf5edec8d9299 /ripple/fossil/src/bin
parent65f0ca486e42e5c054f43524e9f2709b292f08b3 (diff)
downloadunf-legacy-62e3cac7747f6660d2b43ed5c21be8ab584dff5d.tar.zst
ripple/fossil: split out FileRef/DirectoryRef
Change-Id: I649c89ccc4e7fbc3ce42c86f6653d59c07cf58a9
Diffstat (limited to 'ripple/fossil/src/bin')
-rw-r--r--ripple/fossil/src/bin/extract.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/ripple/fossil/src/bin/extract.rs b/ripple/fossil/src/bin/extract.rs
index 685805d..e55c857 100644
--- a/ripple/fossil/src/bin/extract.rs
+++ b/ripple/fossil/src/bin/extract.rs
@@ -32,13 +32,13 @@ fn extract(store: &fossil::Store, path: &Path, dir: &Directory) {
 	for (name, node) in &dir.children {
 		let path = path.join(name);
 		match node.clone() {
-			fossil::Node::Directory { r#ref, size: _ } => {
-				let blob = store.read_blob(r#ref);
+			fossil::Node::Directory(fossil::DirectoryRef { ident, size: _ }) => {
+				let blob = store.read_blob(ident);
 				let pb = store::Directory::decode(&*blob).unwrap();
 				fs::create_dir(&path).unwrap();
 				extract(store, &path, &Directory::from_pb(pb));
 			}
-			fossil::Node::File { r#ref, executable } => {
+			fossil::Node::File(fossil::FileRef { ident, executable }) => {
 				let mode = if executable { 0o755 } else { 0o644 };
 				let mut f = fs::OpenOptions::new()
 					.write(true)
@@ -46,7 +46,7 @@ fn extract(store: &fossil::Store, path: &Path, dir: &Directory) {
 					.mode(mode)
 					.open(path)
 					.unwrap();
-				let blob = store.read_blob(r#ref);
+				let blob = store.read_blob(ident);
 				f.write_all(&blob).unwrap();
 			}
 			fossil::Node::Link { target } => {