diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 4a4c30d5e4..fb6125ce3f 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -210,10 +210,12 @@ class Git(FetchMethod): subdir = ud.parm.get("subpath", "") if subdir != "": readpathspec = ":%s" % (subdir) + def_destsuffix = "%s/" % os.path.basename(subdir) else: readpathspec = "" + def_destsuffix = "git/" - destsuffix = ud.parm.get("destsuffix", "git/") + destsuffix = ud.parm.get("destsuffix", def_destsuffix) destdir = os.path.join(destdir, destsuffix) if os.path.exists(destdir): bb.utils.prunedir(destdir)