   (setq dir (file-name-as-directory dir))
   (when svn-status-load-state-before-svn-status
     (unless (string= dir (car svn-status-directory-history))
-      (svn-status-load-state t)))
+      (let ((default-directory dir))    ;otherwise svn-status-base-dir looks in the wrong place
+        (svn-status-load-state t))))
   (setq svn-status-directory-history (delete dir svn-status-directory-history))
   (add-to-list 'svn-status-directory-history dir)
   (if (string= (buffer-name) svn-status-buffer-name)

(defcustom svn-status-sort-status-buffer t
  "*Whether to sort the `svn-status-buffer-name' buffer.

Setting this variable to nil speeds up \[M-x svn-status], however the
listing may then become incorrect.

This can be toggled with \\[svn-status-toggle-sort-status-buffer]."

See `svn-status--line-info->directory-p' for what counts as a directory."
  :group 'psvn-faces)

;not based on anything, may be horribly ugly!
(defface svn-status-symlink-face
  '((((class color) (background light)) (:foreground "cornflower blue"))
    (((class color) (background dark)) (:foreground "cyan")))
  "Face for symlinks in *svn-status* buffers.

This is the face given to the actual link (i.e., the versioned item),
the target of the link gets either `svn-status-filename-face' or
`svn-status-directory-face'."
  :group 'psvn-faces)

;based on font-lock-warning-face
(defface svn-status-locked-face
  '((t
