diff --git a/app/Main.hs b/app/Main.hs
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -86,9 +86,12 @@
 
 handle :: (MonadIO m, MonadLogger m, MonadMask m, MonadParallel m, MonadReader Config m) => Options -> m ()
 handle options = do
-    filePaths <- runPanic $ if null (argPaths options)
+    rootDir         <- liftIO getCurrentDirectory
+    filePaths       <- runPanic $ if null (argPaths options)
         then initialFilePaths options
         else liftM2 intersect (initialFilePaths options) (providedFilePaths options)
+    absFilePaths    <- forM filePaths $ \filePath -> ifM (liftIO $ doesFileExist filePath)
+        (liftIO $ canonicalizePath filePath) (return filePath)
 
     numThreads <- liftIO getNumCapabilities >>= \numCapabilities ->
         return $ fromMaybe numCapabilities (optThreads options)
@@ -96,7 +99,7 @@
     (output, input) <- liftIO $ spawn unbounded
 
     withSystemTempDirectory "git-fmt" $ \tmpDir -> do
-        runEffect $ each (map (\filePath -> omnifmt filePath (tmpDir </> filePath)) filePaths) >-> toOutput output
+        runEffect $ each (map (\filePath -> omnifmt (makeRelative rootDir filePath) (tmpDir </> dropDrive filePath)) absFilePaths) >-> toOutput output
 
         liftIO performGC
 
diff --git a/git-fmt.cabal b/git-fmt.cabal
--- a/git-fmt.cabal
+++ b/git-fmt.cabal
@@ -1,5 +1,5 @@
 name:           git-fmt
-version:        0.3.1.0
+version:        0.3.1.1
 
 author:         Henry J. Wylde
 maintainer:     public@hjwylde.com
diff --git a/src/Omnifmt/Config.hs b/src/Omnifmt/Config.hs
--- a/src/Omnifmt/Config.hs
+++ b/src/Omnifmt/Config.hs
@@ -66,12 +66,10 @@
     Right config    -> return $ Just config
 
 -- | Finds the nearest config file by searching from the given directory upwards.
---
---   TODO (hjw): fix the bug where it won't search the root directory.
 nearestConfigFile :: MonadIO m => FilePath -> m (Maybe FilePath)
-nearestConfigFile dir = findM (liftIO . doesFileExist) $ map (</> defaultFileName) parents
+nearestConfigFile dir = liftIO (canonicalizePath dir) >>= \dir' -> findM (liftIO . doesFileExist) $ map (</> defaultFileName) (parents dir')
     where
-        parents = takeWhile (\dir -> dir /= takeDrive dir) (iterate takeDirectory dir)
+        parents = reverse . scanl1 combine . splitDirectories
 
 -- | The file name of the default config, '.omnifmt.yaml'.
 defaultFileName :: FilePath
