]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: Add a sanity check to the debugsrcdir removal code
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 24 Feb 2012 16:09:00 +0000 (16:09 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 24 Feb 2012 16:10:36 +0000 (16:10 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index 266173cdf2a2fea075e37ce3586f76024f0d164e..91c4c6ee1200bbbfd95c6087f62b01fe8d2a4010 100644 (file)
@@ -276,7 +276,7 @@ def splitfile2(debugsrcdir, d):
 
        # Also remove debugsrcdir if its empty
        for p in nosuchdir[::-1]:
-           if not os.listdir(p):
+           if os.path.exists(p) and not os.listdir(p):
                os.rmdir(p)
 
 def runstrip(file, elftype, d):