Nice Apartment, Nasty Building: Is it Worth It?

A friend of mine is on apartment search, and he recently saw a gorgeous, affordable apartment...in a gross building on a highly-questionable street. He and I tried to imagine what it would be like to live somewhere like that: walking home down a filthy street, through a run-down entryway, and up the dirty stairs, to your serene, glamorous apartment. Would the good outweigh the bad at the end of the day?

My situation is not quite as extreme as his potential one: my apartment is nice (hardwood floors, lots of light) but not glamorous, and my building is dirty but not disgusting. But still not great: people leave bags of trash out, if there's a half-eaten apple on the stairs (?!?) it will stay there for a week, packages are routinely stolen, the floors are rarely washed. Now I'm getting depressed... Though the entryway and stairs are less than ideal, I only spend seconds in them everyday. I spend many happy hours in my sunny apartment, so for me, so far, it's what's inside that counts.

Would you put up with a scuzzy building in order to live in a great apartment? Did you every have to give up a great apartment because you just couldn't deal with the scuzziness anymore? Do you think the slovenly conditions of a building- smells, pests, mildew- will inevitably make their way into an apartment?