<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Filepath on Ashish Jaiswal</title>
    <link>https://ashish1099.me/tags/filepath/</link>
    <description>Recent content in Filepath on Ashish Jaiswal</description>
    <generator>Hugo -- 0.147.0</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 16 Mar 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://ashish1099.me/tags/filepath/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Two Go stdlib traps when watching and scanning JSON files on Linux</title>
      <link>https://ashish1099.me/posts/go-filepath-glob-inotify-subdirectory-pitfalls/</link>
      <pubDate>Mon, 16 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://ashish1099.me/posts/go-filepath-glob-inotify-subdirectory-pitfalls/</guid>
      <description>&lt;p&gt;Two bugs surfaced during a CEO-plan audit of the vuls-exporter codebase that are easy to introduce and silent enough to survive code review. Both involve standard-library primitives that look correct but fail quietly on Linux.&lt;/p&gt;
&lt;h2 id=&#34;the-bugs-at-a-glance&#34;&gt;The bugs at a glance&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;filepath.Glob(&amp;quot;**/*.json&amp;quot;)&lt;/code&gt; does not recurse on Linux — it matches nothing in subdirectories and returns &lt;code&gt;nil, nil&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Raw &lt;code&gt;unix.InotifyAddWatch&lt;/code&gt; does not automatically watch new subdirectories — any directory created after the watch is set up is silently ignored.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;bug-1-filepathglob-does-not-support-&#34;&gt;Bug 1: filepath.Glob does not support &lt;code&gt;**&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;The code looked like this:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
