Changeset 9471 for trunk/MagicSoft
- Timestamp:
- 07/01/09 14:47:14 (15 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9469 r9471 19 19 -*-*- END OF LINE -*-*- 20 20 21 2009/07/01 Thomas Bretz 22 23 * mreport/MReportDrive.cc: 24 - fixed typo in version number 25 26 * mjobs/MJob.cc: 27 - improved check for write permissions 28 29 30 21 31 2009/06/28 Daniel Hoehne-Moench 22 32 … … 111 121 - fixed the decoding for runs for which L1TPU was connected 112 122 instead of L1 123 124 * megom/MGeomCamFact.[h,cc]: 125 - added 126 127 * megom/Makefile, mgeom/GeomLinkDef.h: 128 - added MGeomCamFact 113 129 114 130 -
trunk/MagicSoft/Mars/mjobs/MJob.cc
r9345 r9471 401 401 const Bool_t exists = !gSystem->AccessPathName(fname, kFileExists); 402 402 if (!exists) 403 { 404 const TString dirname = gSystem->DirName(fname); 405 406 Long_t flags; 407 const Bool_t exists2 = !gSystem->GetPathInfo(dirname, 0, (Long_t*)0, &flags, 0); 408 if (!exists2) 409 { 410 *fLog << err << "ERROR - Directory " << dirname << " doesn't exist." << endl; 411 return kFALSE; 412 } 413 414 if (flags&2==0) 415 { 416 *fLog << err << "ERROR - " << dirname << " is not a directory." << endl; 417 return kFALSE; 418 } 419 420 const Bool_t write = !gSystem->AccessPathName(dirname, kWritePermission); 421 if (!write) 422 { 423 *fLog << err << "ERROR - No permission to write to directory " << dirname << endl; 424 return kFALSE; 425 } 426 403 427 return kTRUE; 428 } 429 430 Long_t flags; 431 gSystem->GetPathInfo(fname, 0, (Long_t*)0, &flags, 0); 432 if (flags&4) 433 { 434 *fLog << err << "ERROR - " << fname << " is not a regular file." << endl; 435 return kFALSE; 436 } 404 437 405 438 const Bool_t write = !gSystem->AccessPathName(fname, kWritePermission);
Note:
See TracChangeset
for help on using the changeset viewer.