@@ -1121,7 +1121,6 @@ impl Recorded {
1121
1121
pub fn take_updatables ( & mut self ) -> HashMap < usize , InodeUpdate > {
1122
1122
std:: mem:: replace ( & mut self . updatables , HashMap :: default ( ) )
1123
1123
}
1124
-
1125
1124
pub fn into_change < T : ChannelTxnT + DepsTxnT < DepsError = <T as GraphTxnT >:: GraphError > > (
1126
1125
self ,
1127
1126
txn : & T ,
@@ -1246,6 +1245,8 @@ where
1246
1245
let mut previous_name = Vec :: new ( ) ;
1247
1246
let mut last_alive_meta = None ;
1248
1247
let mut is_first_parent = true ;
1248
+ // Check for any renaming as that's a priority change
1249
+ let mut is_any_rename = false ;
1249
1250
for parent in iter_adjacent (
1250
1251
txn,
1251
1252
channel,
@@ -1300,8 +1301,14 @@ where
1300
1301
"parent_dest {:?} {:?} {:?}" ,
1301
1302
parent_dest, parent_meta, parent_name
1302
1303
) ;
1304
+ if parent_name != name {
1305
+ is_any_rename = true ;
1306
+ }
1303
1307
debug ! ( "new_meta = {:?}, parent_meta = {:?}" , new_meta, parent_meta) ;
1304
1308
let name_changed = parent_name != name;
1309
+ if is_any_rename && !name_changed {
1310
+ continue ;
1311
+ }
1305
1312
let mut meta_changed = new_meta != parent_meta;
1306
1313
if cfg ! ( windows) && !meta_changed {
1307
1314
if let Some ( m) = last_alive_meta {
@@ -1484,13 +1491,15 @@ impl Recorded {
1484
1491
debug ! ( "record_deleted_file {:?} {:?}" , current_vertex, full_path) ;
1485
1492
let mut stack = vec ! [ ( current_vertex. inode_vertex( ) , None ) ] ;
1486
1493
let mut visited = HashSet :: default ( ) ;
1494
+ let mut full_path = std:: borrow:: Cow :: Borrowed ( full_path) ;
1487
1495
while let Some ( ( vertex, inode) ) = stack. pop ( ) {
1488
1496
debug ! ( "vertex {:?}, inode {:?}" , vertex, inode) ;
1489
1497
if let Some ( path) = tree_path ( txn, & vertex. start_pos ( ) ) ? {
1490
1498
if working_copy. file_metadata ( & path) . is_ok ( ) {
1491
1499
debug ! ( "not deleting {:?}" , path) ;
1492
1500
continue ;
1493
1501
}
1502
+ full_path = path. into ( )
1494
1503
}
1495
1504
1496
1505
// Kill this vertex
@@ -1522,7 +1531,7 @@ impl Recorded {
1522
1531
channel,
1523
1532
vertex,
1524
1533
vertex. start_pos ( ) ,
1525
- full_path,
1534
+ & full_path,
1526
1535
) ?
1527
1536
}
1528
1537
0 commit comments