1
我在Windows 7 64位上安裝了IBM DOORS。當我運行DOORS DXL函數tempFileName()時,我得到\而不是像C:\ Users \\ AppData \ Local \ Temp這樣的東西。我一直在搜索這個問題,但沒有看到有關這個問題的任何信息。任何人有想法?爲什麼在Windows 7 64位上DOORS DXL tempFileName函數返回?
一些示例代碼演示問題是...
string productDetailsFile = tempFileName()
print "productDetailsFile = " productDetailsFile "\n"
if(canOpenFile(productDetailsFile, true))
print "Can write to file\n"
Stream out = write productDetailsFile
out << "Created by " doorsname " at " dateAndTime today ""
if (null out)
{
print "Could not create file " productDetailsFile ""
halt
}
flush out
close out
string directory = getDirOf (productDetailsFile)
print "directory = " directory "\n"
string newFileName = directory NLS_("\\") NLS_("DOORS_") doorsInfo(infoVersion) (NLS_(".xml_new"))
print "newFileName = " newFileName "\nAttempting to rename now\n"
string errorMsg = renameFile(productDetailsFile, newFileName)
if (!null errorMsg)
{
print "Rename failed with error - " errorMsg "\nTrying with modified file name now\n"
newFileName = directory NLS_("DOORS_") doorsInfo(infoVersion) (NLS_(".xml_new"))
print "newFileName = " newFileName "\nAttempting to rename now\n"
errorMsg = renameFile(productDetailsFile, newFileName)
if(!null errorMsg)
print "Still fails. Stopping script now, please send the DXL Output to Support"
}
else
print "Rename successful"
你也可以發佈你的代碼。我在windows 7 64位機器上運行'print tempFileName()'並獲得正確的響應。 –
@Steve,昨天我們找到了根本原因。爲了完整起見,我繼續併發布了一些示例代碼來說明問題。感謝您提供幫助! – buzz3791