Skip to content

Commit 18cb4d4

Browse files
committed
Account for one detect model sometimes giving non-unique file UUIDs.
1 parent 8603f38 commit 18cb4d4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/SpecFile.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -5738,7 +5738,10 @@ void SpecFile::cleanup_after_load( const unsigned int flags )
57385738
{
57395739
}//if( !measurements_.empty() )
57405740

5741-
if( uuid_.empty() )
5741+
// If the spectrum file didnt specify a UUID, we will generate one.
5742+
// Also, at least some R225 detectors, which have a format like "{3b01677f-...274}",
5743+
// seem to always use the same UUID, so we will regenerate for those as well.
5744+
if( uuid_.empty() || ((uuid_.front() == '{') && (uuid_.back() == '}')) )
57425745
uuid_ = generate_psuedo_uuid();
57435746

57445747
set_detector_type_from_other_info();

0 commit comments

Comments
 (0)