@@ -19,12 +19,15 @@ use config::ConfigValue;
19
19
use heim:: disk;
20
20
use serde:: Serialize ;
21
21
use serde_json:: Value as JsonValue ;
22
- use std:: collections:: { BTreeMap , HashMap } ;
23
22
use std:: env;
24
23
use std:: error:: Error as StdError ;
25
24
use std:: fs:: { self , File } ;
26
25
use std:: io:: Write ;
27
26
use std:: path:: { Path , PathBuf } ;
27
+ use std:: {
28
+ collections:: { BTreeMap , HashMap } ,
29
+ ffi:: OsStr ,
30
+ } ;
28
31
use tempfile:: NamedTempFile ;
29
32
use tmc_client:: oauth2:: {
30
33
basic:: BasicTokenType , AccessToken , EmptyExtraTokenFields , Scope , StandardTokenResponse ,
@@ -1886,6 +1889,22 @@ fn move_dir(source: &Path, target: &Path, pretty: bool) -> anyhow::Result<()> {
1886
1889
entry. with_context ( || format ! ( "Failed to read file inside {}" , source. display( ) ) ) ?;
1887
1890
let entry_path = entry. path ( ) ;
1888
1891
1892
+ if entry_path. file_name ( ) == Some ( OsStr :: new ( ".tmc.lock" ) ) {
1893
+ log:: info!( "skipping lock file" ) ;
1894
+ file_count_copied += 1 ;
1895
+ reporter
1896
+ . progress (
1897
+ format ! (
1898
+ "Skipped moving file {} / {}" ,
1899
+ file_count_copied, file_count_total
1900
+ ) ,
1901
+ file_count_copied as f64 / file_count_total as f64 ,
1902
+ None ,
1903
+ )
1904
+ . map_err ( |e| anyhow:: anyhow!( e) ) ?;
1905
+ continue ;
1906
+ }
1907
+
1889
1908
if entry_path. is_file ( ) {
1890
1909
let relative = entry_path. strip_prefix ( source) . unwrap ( ) ;
1891
1910
let target_path = target. join ( relative) ;
0 commit comments