          (mark-count 0)
          (line-info (svn-status-get-line-information))
          (file-name (svn-status-line-info->filename line-info))
-         (sub-file-regexp (concat "^" (regexp-quote
-                                       (file-name-as-directory file-name))))
+         (sub-file-regexp (if (file-directory-p file-name)
+                              (concat "^" (regexp-quote
+                                           (file-name-as-directory file-name)))
+                            nil))
          (newcursorpos-fname)
          (i-fname)
          (first-line t)

                                                   svn-wc-locked-mark
                                                   svn-with-history-mark
                                                   svn-switched-mark
                                                   svn-repo-locked-mark)
                        svn-status-info)))
          (when (eq svn-file-mark ?X)
            (svn-puthash (match-string 1) (car svn-status-info) externals-map)

                     elide-hint)
             'svn-status-marked-face)
            "\n")))

(defun svn-status-redraw-status-buffer ()
  "Redraw the `svn-status-buffer-name' buffer.
Additionally clear the psvn-extra-info field in all line-info lists."
  (interactive)
  (dolist (line-info svn-status-info)
    (svn-status-line-info->set-psvn-extra-info line-info nil))
  (svn-status-update-buffer))

(defun svn-status-update-buffer ()
  "Update the `svn-status-buffer-name' buffer, using `svn-status-info'.
