diff --git a/plugins/channelrx/sigmffilesink/readme.md b/plugins/channelrx/sigmffilesink/readme.md
index bf6b7fb90..21691249a 100644
--- a/plugins/channelrx/sigmffilesink/readme.md
+++ b/plugins/channelrx/sigmffilesink/readme.md
@@ -10,6 +10,9 @@ As per SigMF specifications two files are created in fact.
- One with `.sigmf-meta` extension contains meta data and details to find the different captures in the data file blob. It is written in JSON format and is human readable. You can refer to SigMF documentation in the link at top to read about the details.
- Another with `.sigmf-data` contains the IQ data as a blob indexed by structures in the `.sigmf-meta` file. Thus to the SigMF file reader data appears as a sequence of captures having idependent start time and length, center frequency and with SDRangel specific extensions independent sample rates.
+If a filename is given without `.sigmf-meta` extension then the `.sigmf-meta` extension is appended automatically.
+If a filename is given with an extension different of `.sigmf-meta` then the extension is replaced by `.sigmf-meta` automatically.
+
It adds a dependency to the [libsigmf library](https://github.com/f4exb/libsigmf) more specifically the `f4exb` fork that supports `multirecordings` and `sdrangel` extensions.
Interface
diff --git a/plugins/channelrx/sigmffilesink/sigmffilesinksink.cpp b/plugins/channelrx/sigmffilesink/sigmffilesinksink.cpp
index d82a99385..0687a46cd 100644
--- a/plugins/channelrx/sigmffilesink/sigmffilesinksink.cpp
+++ b/plugins/channelrx/sigmffilesink/sigmffilesinksink.cpp
@@ -237,10 +237,28 @@ void SigMFFileSinkSink::applySettings(const SigMFFileSinkSettings& settings, boo
<< "m_fileRecordName: " << settings.m_fileRecordName
<< "force: " << force;
+ QString fileRecordName = settings.m_fileRecordName;
+
if ((settings.m_fileRecordName != m_settings.m_fileRecordName) || force)
{
+ QStringList dotBreakout = settings.m_fileRecordName.split(QLatin1Char('.'));
+
+ if (dotBreakout.size() > 1) {
+ QString extension = dotBreakout.last();
+
+ if (extension != "sigmf-meta") {
+ dotBreakout.last() = "sigmf-meta";
+ }
+ }
+ else
+ {
+ dotBreakout.append("sigmf-meta");
+ }
+
+ fileRecordName = dotBreakout.join(QLatin1Char('.'));
+
QString fileBase;
- FileRecordInterface::RecordType recordType = FileRecordInterface::guessTypeFromFileName(settings.m_fileRecordName, fileBase);
+ FileRecordInterface::RecordType recordType = FileRecordInterface::guessTypeFromFileName(fileRecordName, fileBase);
if (recordType == FileRecordInterface::RecordTypeSigMF)
{
@@ -266,6 +284,7 @@ void SigMFFileSinkSink::applySettings(const SigMFFileSinkSettings& settings, boo
}
m_settings = settings;
+ m_settings.m_fileRecordName = fileRecordName;
}
void SigMFFileSinkSink::squelchRecording(bool squelchOpen)