fix dir naming in ingest command

This commit is contained in:
2026-09-15 11:32:05 +02:00
parent bf988bcb50
commit ad4d9b4c7a
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -87,8 +87,8 @@ def explore_dir(ftp_connection: FTP, dir_descriptors: DirDescriptors):
content: List[str] = ftp_connection.nlst()
if "ASSETMAP" in content or "ASSETMAP.xml" in content:
dir_name: str = ftp_connection.pwd()
unique = uuid5(namespace=NAMESPACE_OID,name=dir_name).hex.upper()[:11]
dir_descriptors[unique] = FTPDirInfo(name=ftp_connection.pwd())
unique = uuid5(namespace=NAMESPACE_OID, name=dir_name).hex.upper()[:11]
dir_descriptors[unique] = FTPDirInfo(name=ftp_connection.pwd().lstrip('/'))
else:
for d in content:
ftp_connection.cwd(d)
+1 -1
View File
@@ -58,7 +58,7 @@ def on_command(client: mqtt_client.Client, userdata: Any, msg: mqtt_client.MQTTM
unique: str = notify.unique
this_server: FTPServer = list(filter(lambda s: unique in s.dirs.keys(), dcp_servers.servers))[0]
user_pswd: str = f"{this_server.username}:{this_server.password}" if this_server.username else "anonymous:"
dir_name: str = f"{this_server.cwd if this_server.cwd else ""}{"/" if this_server.cwd else ""}{this_server.dirs[unique].name}"
dir_name: str = this_server.dirs[unique].name
ingest_command: AddImportJob = AddImportJob()
assert isinstance(ingest_command.MessageBody, CommandBodyWrapper)
ingest_command.MessageBody.Command.ParameterList.Parameter.insert(0,