<p dir="auto">This discrepancy makes comparing file paths very difficult:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { join } from &quot;https://deno.land/std/path/mod.ts&quot;;

console.log(Deno.realPathSync(&quot;.&quot;));
console.log(join(&quot;C:&quot;, &quot;Source&quot;, &quot;Deno&quot;, &quot;fsdisrepancy&quot;));"><pre class="notranslate"><code class="notranslate">import { join } from "https://deno.land/std/path/mod.ts";

console.log(Deno.realPathSync("."));
console.log(join("C:", "Source", "Deno", "fsdisrepancy"));
</code></pre></div>
<p dir="auto">Prints out this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="C:/Source/Deno/fsdisrepancy
C:\Source\Deno\fsdisrepancy"><pre class="notranslate"><code class="notranslate">C:/Source/Deno/fsdisrepancy
C:\Source\Deno\fsdisrepancy
</code></pre></div>
<p dir="auto">This is very problematic, because a lot of libraries are written using <code class="notranslate">join</code>, and if on some point of your code you use realPath then comparing the paths with <code class="notranslate">===</code> is not possible.</p>
<p dir="auto">Imagine using a library A that uses <code class="notranslate">realPath</code>, and library that uses <code class="notranslate">join</code> at some point, one can't compare the paths with <code class="notranslate">===</code> without sanitization which becomes messy.</p>
<p dir="auto">Observed on Deno 1.0.1, for example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PS C:\Users\srackham&gt; deno eval &quot;console.log(Deno.realPathSync('.'))&quot;
C:/Users/srackham"><pre class="notranslate"><code class="notranslate">PS C:\Users\srackham&gt; deno eval "console.log(Deno.realPathSync('.'))"
C:/Users/srackham
</code></pre></div>
<p dir="auto">Other Deno path APIs return '\' separated paths on Window e.g. Deno.cwd().</p>