Lines 614-625
Link Here
|
614 |
# the current working directory (from the shell). |
614 |
# the current working directory (from the shell). |
615 |
mydir = os.environ["PWD"] |
615 |
mydir = os.environ["PWD"] |
616 |
mydir = normalize_path(mydir) |
616 |
mydir = normalize_path(mydir) |
617 |
path_ids = set() |
617 |
path_ids = {} |
618 |
p = mydir |
618 |
p = mydir |
619 |
s = None |
619 |
s = None |
620 |
while True: |
620 |
while True: |
621 |
s = os.stat(p) |
621 |
s = os.stat(p) |
622 |
path_ids.add((s.st_dev, s.st_ino)) |
622 |
path_ids[(s.st_dev, s.st_ino)] = p |
623 |
if p == "/": |
623 |
if p == "/": |
624 |
break |
624 |
break |
625 |
p = os.path.dirname(p) |
625 |
p = os.path.dirname(p) |
Lines 632-641
Link Here
|
632 |
s = os.stat(overlay) |
632 |
s = os.stat(overlay) |
633 |
except OSError: |
633 |
except OSError: |
634 |
continue |
634 |
continue |
635 |
overlay_id = (s.st_dev, s.st_ino) |
635 |
overlay = path_ids.get((s.st_dev, s.st_ino)) |
|
|
636 |
if overlay is None: |
637 |
continue |
636 |
if overlay[-1] != "/": |
638 |
if overlay[-1] != "/": |
637 |
overlay += "/" |
639 |
overlay += "/" |
638 |
if overlay_id in path_ids: |
640 |
if True: |
639 |
portdir_overlay = overlay |
641 |
portdir_overlay = overlay |
640 |
subdir = mydir[len(overlay):] |
642 |
subdir = mydir[len(overlay):] |
641 |
if subdir and subdir[-1] != "/": |
643 |
if subdir and subdir[-1] != "/": |