"/" character in sequence name should not be allowed

Issue #759 resolved
Jeanfi created an issue

In v1.11 #41

When using the "/" character in sequence name, (example : LRGB 60s-90s \ 76g 15o) when saving the sequence or adding as template an error is raised and log reports :

[2021-01-30T19:26:50.4716] [ERROR] [Message] Could not find a part of the path 'C:\Users\Astro\Documents\N.I.N.A\Templates\LRGB 60s-90s \ 76g 15o.template.json'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
at NINA.Sequencer.TemplateController.AddNewUserTemplate(ISequenceContainer sequenceContainer)

"/" character should be forbidden when user is typing the name of the sequence or at least a message should tell the user to modify the name of the sequence when saving.

Comments (2)

  1. Stefan B repo owner

    For the next nightly build, the invalid filename characters will be replaced on saving. The name can still support these characters, but the filename will replace them.

  2. Log in to comment