]> OCCT Git - occt.git/commitdiff
0033337: DRAW - Can't load plugins on Linux OS
authordpasukhi <dpasukhi@opencascade.com>
Thu, 9 Mar 2023 16:24:11 +0000 (16:24 +0000)
committervglukhik <vglukhik@opencascade.com>
Tue, 21 Mar 2023 12:36:43 +0000 (12:36 +0000)
WSL 2 have windows FileSystem and as a result we have \r symbols before \n
For this cases we can just remove \r\n (\n is a last symbol) for the node value.

src/Resource/Resource_Manager.cxx
tests/bugs/demo/bug23671

index 01b8ab443fd24ffee1faddf15e98f57769db9cd1..e773d624d6f9e0ec16f88e743c6744ab6ad14105 100644 (file)
@@ -225,6 +225,14 @@ static Resource_KindOfLine WhatKindOfLine(OSD_File& aFile,
     aToken2.Clear();
   else {
     Line.Remove(1,Pos-1);
+    const Standard_Integer aLineLength = Line.Length();
+    if (aLineLength >= 2)
+    {
+      if (Line.Value(aLineLength - 1) == '\r')
+      {
+        Line.Remove(aLineLength - 1);
+      }
+    }
     Line.Remove(Line.Length());
     aToken2 = Line;
   }
index b6dd7dd3f323de8ab25eea48eb9af980294c7757..165f954f011d7451b61990dd787986a006f94bd4 100755 (executable)
@@ -1,6 +1,3 @@
-puts "TODO CR23671 Linux: Error"
-puts "TODO CR23671 Linux: Draw_Failure: Could not open"
-
 puts "============"
 puts "CR23671"
 puts "============"