~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_readdir_pyx.pyx

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-05-21 04:57:17 UTC
  • mfrom: (5244.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20100521045717-qe9khoe3xia0fqwm
(lifeless) Merge from 2.1,
 fix for closing fd's when a specific file is supplied to status/commit etc.
 (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
307
307
        if orig_dir_fd == -1:
308
308
            raise_os_error(errno, "open: ", ".")
309
309
        if -1 == chdir(path):
 
310
            # Ignore the return value, because we are already raising an
 
311
            # exception
 
312
            close(orig_dir_fd)
310
313
            raise_os_error(errno, "chdir: ", path)
311
314
    else:
312
315
        orig_dir_fd = -1