Show More
@@ -614,22 +614,13 b' def checkcase(path):' | |||
|
614 | 614 | def fspath(name, root): |
|
615 | 615 | '''Get name in the case stored in the filesystem |
|
616 | 616 | |
|
617 | The name is either relative to root, or it is an absolute path starting | |
|
618 | with root. Note that this function is unnecessary, and should not be | |
|
617 | The name should be relative to root, and be normcase-ed for efficiency. | |
|
618 | ||
|
619 | Note that this function is unnecessary, and should not be | |
|
619 | 620 | called, for case-sensitive filesystems (simply because it's expensive). |
|
620 | 621 | |
|
621 |
|
|
|
622 | The root should be normcase-ed, too. | |
|
622 | 623 | ''' |
|
623 | # If name is absolute, make it relative | |
|
624 | if name.startswith(root): | |
|
625 | l = len(root) | |
|
626 | if name[l] == os.sep or name[l] == os.altsep: | |
|
627 | l = l + 1 | |
|
628 | name = name[l:] | |
|
629 | ||
|
630 | if not os.path.lexists(os.path.join(root, name)): | |
|
631 | return None | |
|
632 | ||
|
633 | 624 | def find(p, contents): |
|
634 | 625 | lenp = len(p) |
|
635 | 626 | for n in contents: |
General Comments 0
You need to be logged in to leave comments.
Login now