~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/cslib/CSPath.cc

  • Committer: Olaf van der Spek
  • Date: 2011-07-04 19:11:47 UTC
  • mto: This revision was merged to the branch mainline in revision 2367.
  • Revision ID: olafvdspek@gmail.com-20110704191147-s99ojek811zi1fzj
Remove unused Name_resolution_context::error_reporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
 
55
55
CSFile *CSPath::try_CreateAndOpen(CSThread *self, int mode, bool retry)
56
56
{
 
57
        volatile CSFile *fh = NULL;
 
58
        
57
59
        try_(a) {
58
 
                return openFile(mode | CSFile::CREATE); // success, do not try again.
 
60
                fh = openFile(mode | CSFile::CREATE); // success, do not try again.
59
61
        }
60
62
        catch_(a) {
61
63
                if (retry || !CSFile::isDirNotFound(&self->myException))
69
71
 
70
72
        }
71
73
        cont_(a);
72
 
        return NULL; 
 
74
        return (CSFile *) fh; 
73
75
}
74
76
 
75
77
CSFile *CSPath::createFile(int mode)
526
528
void CSPath::move(CSPath *to_path)
527
529
{
528
530
        enter_();
 
531
        push_(to_path);
529
532
        lock_(&iRename_lock); // protect against race condition when testing if the new name exists yet or not. 
530
533
        if (to_path->exists())
531
534
                CSException::throwFileError(CS_CONTEXT, to_path->getCString(), EEXIST);
533
536
        /* Cannot move from TD to non-TD: */
534
537
        sys_rename(iPath->getCString(), to_path->getCString());
535
538
        unlock_(&iRename_lock);
 
539
        release_(to_path);
536
540
        exit_();
537
541
}
538
542