@@ -19,12 +19,15 @@ use config::ConfigValue;
1919use heim:: disk;
2020use serde:: Serialize ;
2121use serde_json:: Value as JsonValue ;
22- use std:: collections:: { BTreeMap , HashMap } ;
2322use std:: env;
2423use std:: error:: Error as StdError ;
2524use std:: fs:: { self , File } ;
2625use std:: io:: Write ;
2726use std:: path:: { Path , PathBuf } ;
27+ use std:: {
28+ collections:: { BTreeMap , HashMap } ,
29+ ffi:: OsStr ,
30+ } ;
2831use tempfile:: NamedTempFile ;
2932use tmc_client:: oauth2:: {
3033 basic:: BasicTokenType , AccessToken , EmptyExtraTokenFields , Scope , StandardTokenResponse ,
@@ -1886,6 +1889,22 @@ fn move_dir(source: &Path, target: &Path, pretty: bool) -> anyhow::Result<()> {
18861889 entry. with_context ( || format ! ( "Failed to read file inside {}" , source. display( ) ) ) ?;
18871890 let entry_path = entry. path ( ) ;
18881891
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+
18891908 if entry_path. is_file ( ) {
18901909 let relative = entry_path. strip_prefix ( source) . unwrap ( ) ;
18911910 let target_path = target. join ( relative) ;
0 commit comments