That really doesn't look too bad to me, though if you saw my roof you would know why... I'll just say that's kinda an odd place for the only rail rust to be, meaning to me that water is getting in somewhere close. Probably related to that dent. You might even be able to repair that spot without redoing the entire rail seal. If the price is decent and it's in otherwise good condition, I'd consider it.
One note - That truck has been resprayed as the gutter trim should be chrome (or maybe the chrome trim is missing?). If it has been recently painted, be extra careful as who knows what the paint is hiding...