Fixed the change to empty directory

Two line fix of the change to empty directory bug which occurred when the user
canceled the directory switch dialog.