@@ -82,7 +82,9 @@ def __init__(self, local_dir, remote_dir, include_hidden, concurrent_workers, fo
8282 To overcome this limitation, cloudinary-cli keeps .cld-sync hidden file in the sync directory that contains a
8383 mapping of the diverse file names. This file keeps tracking on the files and allows syncing in both directions.
8484 """
85- self .diverse_file_names = read_json_from_file (self .sync_meta_file , does_not_exist_ok = True )
85+ diverse_file_names = read_json_from_file (self .sync_meta_file , does_not_exist_ok = True )
86+ self .diverse_file_names = dict (
87+ (normalize_file_extension (k ), normalize_file_extension (v )) for k , v in diverse_file_names .items ())
8688 inverted_diverse_file_names = invert_dict (self .diverse_file_names )
8789
8890 cloudinarized_local_file_names = [self .diverse_file_names .get (f , f ) for f in local_file_names ]
@@ -109,13 +111,13 @@ def _get_out_of_sync_file_names(self, common_file_names):
109111 local_etag = self .local_files [f ]['etag' ]
110112 remote_etag = self .recovered_remote_files [f ]['etag' ]
111113 if local_etag != remote_etag :
112- logger .warning (f"{ f } is out of sync" +
113- (f" with '{ self .diverse_file_names [f ]} " if f in self .diverse_file_names else "" ))
114+ logger .warning (f"' { f } ' is out of sync" +
115+ (f" with '{ self .diverse_file_names [f ]} ' " if f in self .diverse_file_names else "" ))
114116 logger .debug (f"Local etag: { local_etag } . Remote etag: { remote_etag } " )
115117 out_of_sync_file_names .add (f )
116118 continue
117119 logger .debug (f"'{ f } ' is in sync" +
118- (f" with '{ self .diverse_file_names [f ]} " if f in self .diverse_file_names else "" ))
120+ (f" with '{ self .diverse_file_names [f ]} ' " if f in self .diverse_file_names else "" ))
119121
120122 return out_of_sync_file_names
121123
@@ -151,7 +153,7 @@ def save_sync_meta_file(self, upload_results):
151153 diverse_filenames = {}
152154 for local_path , remote_path in upload_results .items ():
153155 local = normalize_file_extension (path .relpath (local_path , self .local_dir ))
154- remote = path .relpath (remote_path , self .remote_dir )
156+ remote = normalize_file_extension ( path .relpath (remote_path , self .remote_dir ) )
155157 if local != remote :
156158 diverse_filenames [local ] = remote
157159
0 commit comments