fix(drop-sc): use tempdir function to determine current OS temp directory

main
Marshall Hallenbeck 2023-09-18 12:13:03 -04:00
parent e1e57a6cf0
commit 99bddeda4c
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
import ntpath
import tempfile
class NXCModule:
@ -45,7 +46,7 @@ class NXCModule:
self.file_path = ntpath.join("\\", f"{self.filename}.searchConnector-ms")
if not self.cleanup:
self.scfile_path = f"/tmp/{self.filename}.searchConnector-ms"
self.scfile_path = f"{tempfile.gettempdir()}/{self.filename}.searchConnector-ms"
scfile = open(self.scfile_path, "w")
scfile.truncate(0)
scfile.write('<?xml version="1.0" encoding="UTF-8"?>')