Changeset 73ae4de in tol


Ignore:
Timestamp:
Feb 10, 2011, 3:34:50 PM (16 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
a557227
Parents:
4e6abd1
Message:

Fixes #1091
GetStandardAbsolutePath shows an error message if GetFullPathName fails

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@3166 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/bbasic/dir.cpp

    r4e6abd1 r73ae4de  
    456456  #define maxPathLength_ 10000
    457457  static char fName[maxPathLength_];
     458  fName[0]='\0';
    458459  TCHAR** lppPart={NULL};
    459460  int  len = GetFullPathName(path.String(), maxPathLength_-1, fName, lppPart);
    460   path.Copy(fName,len);
     461  if(len==0)
     462  {
     463    bool ShowLastError(const BText& action, bool force);
     464    ShowLastError(BText("[GetStandardAbsolutePath(\"")+path+"\")]",true);
     465    path = "::INVALID::PATH::";
     466  }
     467  else
     468  {
     469    path.Copy(fName,len);
     470  }
    461471  path.Replace("\\","/");
    462472#else
Note: See TracChangeset for help on using the changeset viewer.