changeset 37249:fe061e47a2cf

lfs: avoid an improper usage of os.path.basename() to parse a URI
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 31 Mar 2018 23:47:56 -0400
parents dfb38c4850a9
children 9640ccf44ac0
files hgext/lfs/wireprotolfsserver.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/lfs/wireprotolfsserver.py	Sat Mar 31 15:20:43 2018 -0400
+++ b/hgext/lfs/wireprotolfsserver.py	Sat Mar 31 23:47:56 2018 -0400
@@ -10,7 +10,6 @@
 import datetime
 import errno
 import json
-import os
 
 from mercurial.hgweb import (
     common as hgwebcommon,
@@ -242,7 +241,7 @@
     """
 
     method = req.method
-    oid = os.path.basename(req.dispatchpath)
+    oid = req.dispatchparts[-1]
     localstore = repo.svfs.lfslocalblobstore
 
     if method == b'PUT':