If you try to start bitcoind with a corrupted wallet, it will attempt to run CWalletDB::Recover, which moves wallet.dat to some other name, reads all the records, and writes them to a fresh wallet.dat.
However, when moving wallet.dat, it searches the current directory rather than .bitcoin, so if you start bitcoind from anywhere else, it'll fail. To see this, run
echo "I'm not a real wallet!" > ~/.bitcoin/wallet.dat ## MOVE YOUR REAL WALLET OUT OF THE WAY
bitcoind
The output on stdout is simply "Error:" with no additional information. In debug.log you will see something like
2015-08-23 16:13:17 CDBEnv::Open: LogDir=/home/apoelstra/.bitcoin/database ErrorFile=/home/apoelstra/.bitcoin/db.log
2015-08-23 16:13:17 Failed to rename wallet.dat to wallet.1440346397.bak (err -1)
2015-08-23 16:13:17 errno 2: No such file or directory
(The errno line won't appear; I added that while investigating the bug.)
On the other hand, if you run bitcoind from ~/.bitcoin itself, it will rename the wallet successfully (and instead fail trying to read records from "I'm not a wallet!" :)).