Skip to content

Commit 9db3ae8

Browse files
KyllianAubryGitHub Enterprise
authored andcommitted
SKA-1079: check file extension (#219)
1 parent eeaa997 commit 9db3ae8

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

FmuImporter/FmuImporter/Program.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ private static async Task Main(string[] args)
120120
throw new FileNotFoundException($"The provided FMU file path ({fmuPath}) is invalid.");
121121
}
122122

123+
if (!Path.GetExtension(fmuPath).Equals(".fmu"))
124+
{
125+
throw new ArgumentException($"The provided file ({fmuPath}) does not have a '.fmu' extension.");
126+
}
127+
123128
if(createPersitentFmu)
124129
{
125130
// special case early exit : if "--persist" flag is passed, generate the persistent FMU folder and return, no simulation should be started

0 commit comments

Comments
 (0)