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/. |