src/partdownloader.cpp

changeset 1064
4c7a353cf583
parent 1049
71946fed475a
child 1065
c8ecddbd99e9
equal deleted inserted replaced
1063:1f15c52c11f6 1064:4c7a353cf583
104 if (destination.right (4) != ".dat") 104 if (destination.right (4) != ".dat")
105 { 105 {
106 // Remove the existing extension, if any. It may be we're here over a typo in the .dat extension. 106 // Remove the existing extension, if any. It may be we're here over a typo in the .dat extension.
107 int dotPosition = destination.lastIndexOf("."); 107 int dotPosition = destination.lastIndexOf(".");
108 108
109 if ((dotPosition != -1) and (dotPosition >= destination.length() - 4)) 109 if ((dotPosition != -1) and (dotPosition >= length(destination) - 4))
110 destination.chop (destination.length() - dotPosition); 110 destination.chop(length(destination) - dotPosition);
111 111
112 destination += ".dat"; 112 destination += ".dat";
113 } 113 }
114 114
115 // If the part starts with s\ or s/, then use parts/s/. Same goes with 48\ and p/48/. 115 // If the part starts with s\ or s/, then use parts/s/. Same goes with 48\ and p/48/.

mercurial