# The Folder Tool That Never Stopped: Base Cases

Find out why the folder tool crashed on one customer's drive, and make every recursive function you write stop: why a bigger stack, catching the error and a depth limit all fall short, and the two rules of a base case that fix it.

![Cheat sheet: The Folder Tool That Never Stopped: Base Cases](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/961b94a94f0b4852b65b89af9f6bf063.webp)

- Category: Data Structures
- Level: Apprentice
- Tags: Base Case, data structures, Infinite Recursion, Stack Overflow
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/ds-recursion-base-case-cheat-sheet
