@@ -161,11 +161,11 @@ std::string concat_dir_file(
161
161
// / This is not designed to operate on path names and will replace folder
162
162
// / seperator characters.
163
163
// / \param file_name: The file name to sanitize.
164
- // / \param max_size : The maximum size for the file name. If the name is longer,
165
- // / then its size will be cut to the max_size .
164
+ // / \param max_length : The maximum length for the file name. If the name is
165
+ // / longer, then its length will be cut to the max_length .
166
166
std::string make_valid_filename (
167
167
std::string file_name,
168
- const std::size_t max_size )
168
+ const std::size_t max_length )
169
169
{
170
170
std::replace (file_name.begin (), file_name.end (), ' #' , ' _' );
171
171
std::replace (file_name.begin (), file_name.end (), ' $' , ' _' );
@@ -174,7 +174,7 @@ std::string make_valid_filename(
174
174
std::replace (file_name.begin (), file_name.end (), ' \\ ' , ' .' );
175
175
std::replace (file_name.begin (), file_name.end (), ' <' , ' [' );
176
176
std::replace (file_name.begin (), file_name.end (), ' >' , ' ]' );
177
- if (file_name.size () > max_size )
178
- file_name.resize (max_size );
177
+ if (file_name.size () > max_length )
178
+ file_name.resize (max_length );
179
179
return file_name;
180
180
}
0 commit comments