src/partdownloader.cpp

changeset 1065
c8ecddbd99e9
parent 1064
4c7a353cf583
child 1072
9ce9496427f2
equal deleted inserted replaced
1064:4c7a353cf583 1065:c8ecddbd99e9
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 >= length(destination) - 4)) 109 if ((dotPosition != -1) and (dotPosition >= countof(destination) - 4))
110 destination.chop(length(destination) - dotPosition); 110 destination.chop(countof(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