]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Some corrections.
authorrnv <rnv@opencascade.com>
Wed, 27 Feb 2019 15:36:37 +0000 (18:36 +0300)
committerrnv <rnv@opencascade.com>
Wed, 27 Feb 2019 15:36:37 +0000 (18:36 +0300)
src/Basics/Basics_DirUtils.cxx
src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx

index afcadf2ed0110ee7e93e2ac6a73f9118411d93f3..9e954256775416771a00c3ffd83ba633f0a29b59 100644 (file)
@@ -219,7 +219,7 @@ namespace Kernel_Utils
 #ifdef UNICODE
          std::wstring aPathToCheck = utf8_decode_s( thePath );
 #else
-         aPathToCheck = thePath;
+         std::string aPathToCheck = thePath;
 #endif
     if (  GetFileAttributes ( aPathToCheck.c_str()  ) == 0xFFFFFFFF  ) {
       if (  GetLastError () == FILE_ATTRIBUTE_READONLY ) {
@@ -304,7 +304,7 @@ namespace Kernel_Utils
 #ifdef UNICODE
        std::wstring aPathToCheck = utf8_decode_s(thePath);
 #else
-       aPathToCheck = thePath;
+       std::string aPathToCheck = thePath;
 #endif
 
     HANDLE hFile = FindFirstFile( aPathToCheck.c_str(), &aFileData );
index 2bcb37dc257f87c8770bde532cdb253026005fc6..08ef765f5b873a135cd425174a176580123d8579 100644 (file)
@@ -63,7 +63,11 @@ std::string SALOMEDS_AttributeStudyProperties::GetUserName()
 #ifndef WIN32
   else aName = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetUserName();
 #else
+#ifdef UNICODE
   else aName = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetUserNameW();
+#else
+  else aName = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetUserNameA();
+#endif
 #endif
   return aName;
 }