Arc diff [paths] does not find changes for paths provided

OS: Win10
SCM: SVN (1.8.9)
PHP: 7.2.7

Reproduction Instructions
When calling arc diff without a path, it works properly and detects the changes. The result is:

arc diff
Included changes:
               A       tests/xyz.txt

However when calling arc dif with the absolute path of tests/xyz.txt the result is:

arc diff arc D:/arc_test/tests/xyz.txt
Usage Exception: There are no changes to generate a diff from!

Investigation Results
We did some debugging and found that the change is initially correctly parsed from svn status, but then it gets dismissed. This happens in ArcanistDiffWorkflow.php:

844    $file_list = new FileList($this->getArgument('paths', array()));
845    $paths = $repository_api->getSVNStatus($externals = true);
846    foreach ($paths as $path => $mask) {
847       if (!$file_list->contains($repository_api->getPath($path), true)) {
848         unset($paths[$path]);
849       }
850    }

Line 847 returns false because getPath always appends the base path of the respository. However for an absolute path this is not required. The result does not match the path in the file_list any more. So the path gets dismissed. Here is ArcanistRepositoryAPI getPath:

100    public function getPath($to_file = null) {
101    if ($to_file !== null) {
102       return $this->path.DIRECTORY_SEPARATOR.
103          ltrim($to_file, DIRECTORY_SEPARATOR);
104       } else {
105          return $this->path.DIRECTORY_SEPARATOR;
106       }
107    }

If in line 102 we remove everything after the return and just return the ltrim it works.

Kindly double check the issue. In case you have any questions please let us know.

Phabricator/Arcanist Version
Arc Version: f0f95e5b2612d011592f9dbe1885756c5219c70b (22 Mar 2021)