~ubuntu-branches/ubuntu/raring/unrar-nonfree/raring-proposed

« back to all changes in this revision

Viewing changes to errhnd.cpp

  • Committer: Package Import Robot
  • Author(s): Martin Meredith
  • Date: 2012-02-14 22:39:32 UTC
  • mfrom: (1.2.12)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: package-import@ubuntu.com-20120214223932-80w6cf6q639kinh4
Tags: upstream-4.1.4
ImportĀ upstreamĀ versionĀ 4.1.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
  if (FileName!=NULL)
178
178
    Log(ArcName,St(MCannotCreate),FileName);
179
179
  Alarm();
180
 
#if defined(_WIN_ALL) && !defined(_WIN_CE) && !defined(SFX_MODULE) && defined(MAX_PATH)
 
180
 
 
181
#if defined(_WIN_ALL) && !defined(_WIN_CE) && defined(MAX_PATH)
 
182
  CheckLongPathErrMsg(FileName,FileNameW);
 
183
#endif
 
184
 
 
185
  SysErrMsg();
 
186
#endif
 
187
}
 
188
 
 
189
 
 
190
// Check the path length and display the error message if it is too long.
 
191
void ErrorHandler::CheckLongPathErrMsg(const char *FileName,const wchar *FileNameW)
 
192
{
 
193
#if defined(_WIN_ALL) && !defined(_WIN_CE) && !defined (SILENT) && defined(MAX_PATH)
181
194
  if (GetLastError()==ERROR_PATH_NOT_FOUND)
182
195
  {
183
196
    wchar WideFileName[NM];
191
204
    }
192
205
    if (NameLength>MAX_PATH)
193
206
    {
194
 
      Log(ArcName,St(MMaxPathLimit),MAX_PATH);
 
207
      Log(NULL,St(MMaxPathLimit),MAX_PATH);
195
208
    }
196
209
  }
197
210
#endif
198
 
  SysErrMsg();
199
 
#endif
200
211
}
201
212
 
202
213
 
281
292
#endif
282
293
{
283
294
#ifdef _WIN_ALL
 
295
  // When a console application is run as a service, this allows the service
 
296
  // to continue running after the user logs off. 
284
297
  if (SigType==CTRL_LOGOFF_EVENT)
285
298
    return(TRUE);
286
299
#endif
376
389
#endif
377
390
 
378
391
#if defined(_UNIX) || defined(_EMX)
379
 
  char *err=strerror(errno);
380
 
  if (err!=NULL)
381
 
    Log(NULL,"\n%s",err);
 
392
  if (errno!=0)
 
393
  {
 
394
    char *err=strerror(errno);
 
395
    if (err!=NULL)
 
396
      Log(NULL,"\n%s",err);
 
397
  }
382
398
#endif
383
399
 
384
400
#endif