File tree 2 files changed +9
-6
lines changed 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -886,12 +886,15 @@ bool skip_fn_summary(const std::string &fname)
886
886
}
887
887
888
888
889
- std::string to_file_name (std::string result )
889
+ std::string to_file_name (std::string file_name, std:: size_t suffix_length )
890
890
{
891
- result = make_valid_filename (result);
892
- if (result.size ()>240 )
893
- result.resize (240 ); // Leave a reasonable amount of space for a suffix
894
- return result;
891
+ // The maximum file name length is 255 on most Linux file systems
892
+ // but 140 if using eCryptfs
893
+ std::size_t max_file_name_length=140 -suffix_length;
894
+ file_name = make_valid_filename (file_name);
895
+ if (file_name.size ()>max_file_name_length)
896
+ file_name.resize (max_file_name_length);
897
+ return file_name;
895
898
}
896
899
897
900
std::string to_html_text (std::string result)
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ void dump_instruction_code_in_html(
100
100
std::ostream &ostr
101
101
);
102
102
103
- std::string to_file_name (std::string result );
103
+ std::string to_file_name (std::string file_name, std:: size_t suffix_length= 15 );
104
104
bool skip_fn_summary (const std::string &fname);
105
105
106
106
You can’t perform that action at this time.
0 commit comments