fix(cli): preserve notes during sync moves
Build and Push Docker Container / build-and-push (push) Successful in 1m52s
Build and Push Docker Container / build-and-push (push) Successful in 1m52s
- Leave sync and watch notes empty by default instead of writing placeholder text. - Preserve existing remote notes when moving or adopting files without --note. - Detect tracked local moves by SHA-256 and update remote metadata safely. - Skip files that vanish during watch scans instead of aborting the sync cycle. - Bump NanoShare to 1.24.0 and the standalone CLI to 0.3.0.
This commit is contained in:
@@ -52,14 +52,17 @@ class ConvexDB(ConvexDbBase):
|
||||
)
|
||||
return data
|
||||
|
||||
async def update_file(self, file_id:str, file_name:str, note:str, expires_at:datetime|None, user_id:str, file_path:str=''):
|
||||
async def update_file(self, file_id:str, file_name:str, note:str|None, expires_at:datetime|None, user_id:str, file_path:str='', preserve_missing:bool=False):
|
||||
args = {
|
||||
'file_id': file_id,
|
||||
'file_name': file_name,
|
||||
'file_path': file_path,
|
||||
'note': note,
|
||||
'user_id': user_id
|
||||
}
|
||||
if note is not None:
|
||||
args['note'] = note
|
||||
elif not preserve_missing:
|
||||
args['note'] = ''
|
||||
if expires_at:
|
||||
args['expires_at'] = expires_at.isoformat()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user