src/partDownloader.cpp

changeset 966
a834e43a57da
parent 962
a4b463a7ee82
child 967
eb586d3e1a6a
equal deleted inserted replaced
965:d1b0aa40db91 966:a834e43a57da
160 dest += ".dat"; 160 dest += ".dat";
161 } 161 }
162 162
163 // If the part starts with s\ or s/, then use parts/s/. Same goes with 163 // If the part starts with s\ or s/, then use parts/s/. Same goes with
164 // 48\ and p/48/. 164 // 48\ and p/48/.
165 if (Eq (dest.left (2), "s\\", "s/")) 165 if (isOneOf (dest.left (2), "s\\", "s/"))
166 { 166 {
167 dest.remove (0, 2); 167 dest.remove (0, 2);
168 dest.prepend ("parts/s/"); 168 dest.prepend ("parts/s/");
169 } 169 }
170 elif (Eq (dest.left (3), "48\\", "48/")) 170 elif (isOneOf (dest.left (3), "48\\", "48/"))
171 { 171 {
172 dest.remove (0, 3); 172 dest.remove (0, 3);
173 dest.prepend ("p/48/"); 173 dest.prepend ("p/48/");
174 } 174 }
175 175
571 571
572 // ============================================================================= 572 // =============================================================================
573 // 573 //
574 bool PartDownloadRequest::isFinished() const 574 bool PartDownloadRequest::isFinished() const
575 { 575 {
576 return Eq (state(), State::Finished, State::Failed); 576 return isOneOf (state(), State::Finished, State::Failed);
577 } 577 }
578 578
579 // ============================================================================= 579 // =============================================================================
580 // 580 //
581 void PartDownloadRequest::abort() 581 void PartDownloadRequest::abort()

mercurial