MantisBT - Community
View Issue Details
0027849Community[OCCT] OCCT:Foundation Classespublic2016-09-08 11:062016-12-09 16:39
drazmyslovich 
apn 
normalminor 
closedfixed 
WindowsVC++ 201064 bit
[OCCT] 7.0.0 
[OCCT] 7.1.0[OCCT] 7.1.0 
bugs fclasses bug27849
0027849: ResourceManager path computations fail for the folders containing dots
If the resource files (Plugin, XCAF, STEP, etc.) are located in some folder, which has dots in the name (e.g. "this.is.a.bad.folder.name"), the path assembling logic fails, since OSD_Path will be firstly constructed with the folder path only, which means that the folder name will be interpreted as a file name and an extension (e.g. "this.is.a.bad.folder" is a name and ".name" is an extension). Afterwards, the current name will be attached to the current path, but not an extension!!! Finally, the extension isn't emptied, so the final path is completely wrong (e.g. "this.is.a.bad.folder/XCAF.name").
Additionally, the strangest code for Windows to extract extension from the file path:
// buffer contains the full path without drive letter
if (buffer.Search(".") != -1) // And what if the dot is in folder name???
{
  ext = buffer.Token(".",2); // why 2? I like 3...
  ext.Insert(1,'.');
  pos = buffer.Search(".");
  if (pos != -1)
   buffer.Remove(pos,ext.Length());
}
Not applicable
No tags attached.
Issue History
2016-09-08 11:06drazmyslovichNew Issue
2016-09-08 11:06drazmyslovichAssigned To => drazmyslovich
2016-09-08 11:09gitNote Added: 0057588
2016-09-08 11:10drazmyslovichAssigned Todrazmyslovich => abv
2016-09-08 11:10drazmyslovichStatusnew => resolved
2016-09-08 11:10drazmyslovichSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14604#r14604
2016-11-21 09:50gitNote Added: 0060586
2016-11-21 09:51abvNote Added: 0060587
2016-11-21 09:51abvAssigned Toabv => bugmaster
2016-11-21 09:51abvStatusresolved => reviewed
2016-11-21 11:38mkvAssigned Tobugmaster => mkv
2016-11-21 18:45mkvNote Added: 0060648
2016-11-21 18:46mkvNote Added: 0060649
2016-11-21 18:46mkvAssigned Tomkv => bugmaster
2016-11-21 18:46mkvStatusreviewed => tested
2016-11-21 18:46mkvTest case number => bugs fclasses bug27849
2016-11-24 15:52apnChangeset attached => occt master f9ac4dc9
2016-11-24 15:52apnAssigned Tobugmaster => apn
2016-11-24 15:52apnStatustested => verified
2016-11-24 15:52apnResolutionopen => fixed
2016-12-07 11:25gitNote Added: 0061202
2016-12-07 11:30gitNote Added: 0061248
2016-12-09 16:30aivStatusverified => closed
2016-12-09 16:39aivFixed in Version => 7.1.0

Notes
(0057588)
git   
2016-09-08 11:09   
Branch CR27849 has been created by drazmyslovich.

SHA-1: c4c7876f7432bb2b688e79cb0a8a10126e0d76c6


Detailed log of new commits:

Author: razmyslovich
Date: Thu Sep 8 10:09:12 2016 +0200

    0027849: Fix Resource_Manager path computation logic
(0060586)
git   
2016-11-21 09:50   
Branch CR27849_1 has been created by abv.

SHA-1: 33bf5c094a3c4308a7e3bd01c8dfc54af900e9c1


Detailed log of new commits:

Author: razmyslovich
Date: Thu Sep 8 10:09:12 2016 +0200

    0027849: Fix Resource_Manager path computation logic
    
    Treatment of paths in Resource_Manager is corrected to handle properly paths with dots inside.
    Extraction of extension from path in DOS mode when working on Linux is corrected in OSD_Path.
    Test case added.
(0060587)
abv   
2016-11-21 09:51   
Reviewed, test case added, please test
(0060648)
mkv   
2016-11-21 18:45   
Dear BugMaster,
Branch CR27849_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 33bf5c094a3c4308a7e3bd01c8dfc54af900e9c1

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 63 (63 on master)
Windows: 0 (0 on master)
MacOS : 1142

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR27849_1-master-OCCT/Debian70-64/bugs/fclasses/bug27849.html [^]
http://occt-tests/CR27849_1-master-OCCT/Windows-64-VC10/bugs/fclasses/bug27849.html [^]
bugs fclasses bug27849: OK

Testing on Linux:
occt component :
Total MEMORY difference: 91434329 / 91050924 [+0.42%]
Total CPU difference: 21616.55000000025 / 21539.960000000174 [+0.36%]
products component :
Total MEMORY difference: 29983854 / 29961876 [+0.07%]
Total CPU difference: 5323.419999999958 / 5301.519999999997 [+0.41%]

Testing on Windows:
occt component :
Total MEMORY difference: 56602353 / 56605961 [-0.01%]
Total CPU difference: 20263.110290898458 / 20816.742239798514 [-2.66%]
products component :
Total MEMORY difference: 20832086 / 20798116 [+0.16%]
Total CPU difference: 5285.298279899985 / 5252.881272099973 [+0.62%]

There are no differences in images found by testdiff.
(0060649)
mkv   
2016-11-21 18:46   
Dear BugMaster,
Branch CR27849_1 is TESTED.
(0061202)
git   
2016-12-07 11:25   
Branch CR27849 has been deleted by kgv.

SHA-1: c4c7876f7432bb2b688e79cb0a8a10126e0d76c6
(0061248)
git   
2016-12-07 11:30   
Branch CR27849_1 has been deleted by kgv.

SHA-1: 33bf5c094a3c4308a7e3bd01c8dfc54af900e9c1