# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 2021-04-14 10:57:55
# Node ID c1749dd31cdfee20926465d57d4a5a40a2fb2ebc
# Parent  0428e555acb78c5cb2d74b2b828db7f4cadd62a3

remotefilelog: use the right expandpath in to expand `~`

Given the context where path is most likely a file system path, I suspect that
the initial author confused ui.expandpath and util.expandpath (a proxy for
os.path.expanduser and co)

Differential Revision: https://phab.mercurial-scm.org/D10411

diff --git a/hgext/remotefilelog/__init__.py b/hgext/remotefilelog/__init__.py
--- a/hgext/remotefilelog/__init__.py
+++ b/hgext/remotefilelog/__init__.py
@@ -888,7 +888,7 @@ def gcclient(ui, cachepath):
         progress.update(count)
         count += 1
         try:
-            path = ui.expandpath(os.path.normpath(path))
+            path = util.expandpath(os.path.normpath(path))
         except TypeError as e:
             ui.warn(_(b"warning: malformed path: %r:%s\n") % (path, e))
             traceback.print_exc()