View Issue Details

IDProjectCategoryView StatusLast Update
0027849CommunityOCCT:Foundation Classespublic2016-12-09 16:39
Reporterdrazmyslovich Assigned Toapn  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2010 
Product Version7.0.0 
Target Version7.1.0Fixed in Version7.1.0 
Summary0027849: ResourceManager path computations fail for the folders containing dots
DescriptionIf 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());
}
Steps To ReproduceNot applicable
TagsNo tags attached.
Test case numberbugs fclasses bug27849

Activities

git

2016-09-08 11:09

administrator   ~0057588

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

git

2016-11-21 09:50

administrator   ~0060586

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.

abv

2016-11-21 09:51

manager   ~0060587

Reviewed, test case added, please test

mkv

2016-11-21 18:45

tester   ~0060648

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.

mkv

2016-11-21 18:46

tester   ~0060649

Dear BugMaster,
Branch CR27849_1 is TESTED.

git

2016-12-07 11:25

administrator   ~0061202

Branch CR27849 has been deleted by kgv.

SHA-1: c4c7876f7432bb2b688e79cb0a8a10126e0d76c6

git

2016-12-07 11:30

administrator   ~0061248

Branch CR27849_1 has been deleted by kgv.

SHA-1: 33bf5c094a3c4308a7e3bd01c8dfc54af900e9c1

Related Changesets

occt: master f9ac4dc9

2016-09-08 08:09:12

razmyslovich


Committer: apn Details Diff
0027849: ResourceManager path computations fail for the folders containing dots

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.
Affected Issues
0027849
mod - src/OSD/OSD_Path.cxx Diff File
mod - src/QABugs/QABugs_18.cxx Diff File
mod - src/Resource/Resource_Manager.cxx Diff File
add - tests/bugs/fclasses/bug27849 Diff File

Issue History

Date Modified Username Field Change
2016-09-08 11:06 drazmyslovich New Issue
2016-09-08 11:06 drazmyslovich Assigned To => drazmyslovich
2016-09-08 11:09 git Note Added: 0057588
2016-09-08 11:10 drazmyslovich Assigned To drazmyslovich => abv
2016-09-08 11:10 drazmyslovich Status new => resolved
2016-09-08 11:10 drazmyslovich Steps to Reproduce Updated
2016-11-21 09:50 git Note Added: 0060586
2016-11-21 09:51 abv Note Added: 0060587
2016-11-21 09:51 abv Assigned To abv => bugmaster
2016-11-21 09:51 abv Status resolved => reviewed
2016-11-21 11:38 mkv Assigned To bugmaster => mkv
2016-11-21 18:45 mkv Note Added: 0060648
2016-11-21 18:46 mkv Note Added: 0060649
2016-11-21 18:46 mkv Assigned To mkv => bugmaster
2016-11-21 18:46 mkv Status reviewed => tested
2016-11-21 18:46 mkv Test case number => bugs fclasses bug27849
2016-11-24 15:52 apn Changeset attached => occt master f9ac4dc9
2016-11-24 15:52 apn Assigned To bugmaster => apn
2016-11-24 15:52 apn Status tested => verified
2016-11-24 15:52 apn Resolution open => fixed
2016-12-07 11:25 git Note Added: 0061202
2016-12-07 11:30 git Note Added: 0061248
2016-12-09 16:30 aiv Status verified => closed
2016-12-09 16:39 aiv Fixed in Version => 7.1.0