Skip to contentSkip to conversation

fetch/perforce: Fix single file checkouts

PATCH New Richard Purdie 1 participant 1 message Jun 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fetch/perforce: Fix single file checkouts

Fetching directories with p4 worked but single files did not. This patch from Helmut Auer ([email protected]) fixes that issue.

[YOCTO #7891]

lib/bb/fetch2/perforce.py +1 -1
index 5a6631a..3a10c7c 100644
@@ -123,7 +123,7 @@ class Perforce(FetchMethod):
         if depot.find('/...') != -1:
             path = depot[:depot.find('/...')]
         else:
-            path = depot
+            path = depot[:depot.rfind('/')]
 
         module = parm.get('module', os.path.basename(path))