Skip to content

Commit f9ec46e

Browse files
committed
Fix double logs directory path
1 parent af3677e commit f9ec46e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

nxc/connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,11 @@ def proto_flow(self):
243243
self.enum_host_info()
244244

245245
# Construct the output file template using os.path.join for OS compatibility
246-
base_log_dir = os.path.join(os.path.expanduser(NXC_PATH), "logs")
246+
base_log_dir = os.path.join(NXC_PATH, "logs")
247247
filename_pattern = f"{self.hostname}_{self.host}_{datetime.now().strftime('%Y-%m-%d_%H%M%S')}".replace(":", "-")
248248
self.output_file_template = os.path.join(base_log_dir, "{output_folder}", filename_pattern)
249249
# Default output filename for logs
250-
self.output_filename = self.output_file_template.format(output_folder="logs")
250+
self.output_filename = os.path.join(base_log_dir, filename_pattern)
251251

252252
self.print_host_info()
253253
if self.login() or (self.username == "" and self.password == ""):

0 commit comments

Comments
 (0)