ok/jj
1
0
Fork 0
forked from mirrors/jj

simple_op_store: create temporary Thrift store in .jj/repo directory

Otherwise rename() would fail if /tmp is on different device.
This commit is contained in:
Yuya Nishihara 2022-11-14 10:27:55 +09:00
parent e084956858
commit e0fe3ffd7d

View file

@ -66,7 +66,7 @@ fn upgrade_to_thrift(store_path: PathBuf) -> std::io::Result<()> {
let proto_store = ProtoOpStore::load(store_path.clone()); let proto_store = ProtoOpStore::load(store_path.clone());
let tmp_store_dir = tempfile::Builder::new() let tmp_store_dir = tempfile::Builder::new()
.prefix("jj-op-store-upgrade-") .prefix("jj-op-store-upgrade-")
.tempdir() .tempdir_in(store_path.parent().unwrap())
.unwrap(); .unwrap();
let tmp_store_path = tmp_store_dir.path().to_path_buf(); let tmp_store_path = tmp_store_dir.path().to_path_buf();