![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: File Path Separators Bug Topic Summary: Nasty bug in DOORS file path separators and DOORSHOME Created On: 31-Jul-2007 12:13 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I just found a very interesting bug to do with file path separators.
If you have a forward slash and a back slash together in a path name, doors accepts it. So, the following all work correctly even though the last two should not. print readFile("c:\\test.dxl") print readFile("c:/test.dxl") print readFile("c:/\\test.dxl") print readFile("c:\\/test.dxl") This bug has been around since the year dot, because there is a lot Telelogic DXL code that relies on this bug being there to work. The environment variable DOORSHOME is initialised to "C:\Program Files\Telelogic\DOORS_8.1\". Note the trailing file separator (backslash). This is used to initialise a global variable in init.dxl as follows: string doorsHome = (getenv "DOORSHOME") "" Then the menu creation functions in formal.dxl and other files use this variable to construct file paths as follows: createItem(alwaysOn, "View...", 'V', null, modKeyCtrl, null ,null, "View an existing baseline of the module.",null, doorsHome "/lib/dxl/standard/baseline/openBaseline.dxl") You can see from this example that the actual path to the dxl file is as follows, with an extra file separator before the lib folder: "C:\Program Files\Telelogic\DOORS_8.1\/lib/dxl/standard/baseline/openBaseline.dxl". Telelogic have logged this as a defect with case ID SH5018616. I cannot see this bug ever being fixed because it would affect everyone's DXL. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Hello Tony,
I am just curious to know if the command "readFile" opens the stream that has to be explicitly closed later ! In other words, does readFile() command "read lock" the stream which needs to be closed later? Regards, Shyam ------------------------- Regards, Shyam |
|
![]() |
|
![]() |
|
Bit off topic, but hey...
readFile() does not leave a stream open. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
Telelogic DOORS
» Defect/Issue Tracking
»
File Path Separators Bug
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.