diff options
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/path.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py index f58c0138bb..183f205757 100644 --- a/meta/lib/oe/path.py +++ b/meta/lib/oe/path.py | |||
@@ -45,14 +45,15 @@ def format_display(path, metadata): | |||
45 | 45 | ||
46 | def remove(path): | 46 | def remove(path): |
47 | """Equivalent to rm -f or rm -rf""" | 47 | """Equivalent to rm -f or rm -rf""" |
48 | import os, errno, shutil | 48 | import os, errno, shutil, glob |
49 | try: | 49 | for name in glob.glob(path): |
50 | os.unlink(path) | 50 | try: |
51 | except OSError, exc: | 51 | os.unlink(name) |
52 | if exc.errno == errno.EISDIR: | 52 | except OSError, exc: |
53 | shutil.rmtree(path) | 53 | if exc.errno == errno.EISDIR: |
54 | elif exc.errno != errno.ENOENT: | 54 | shutil.rmtree(path) |
55 | raise | 55 | elif exc.errno != errno.ENOENT: |
56 | raise | ||
56 | 57 | ||
57 | def symlink(source, destination, force=False): | 58 | def symlink(source, destination, force=False): |
58 | """Create a symbolic link""" | 59 | """Create a symbolic link""" |