There is at least one element in `torrent.files` (or could we have an empty torrent?) so `torrent.files[0]` should be safe. 

Then we call `.split` on the path. If it contains multiples components then the first one will be available in `[0]`, if not, then split will do nothing but will still return an array with the entire path as the only element, also `[0]`.

What would you change? Check on `torrent.files[0]`?