Skip to content

Commit

Permalink
Stop .gms being opened.
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen2k6 committed Mar 28, 2023
1 parent fe0c92b commit a6ed6fd
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions GoOS/Kernel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,6 @@

//Goplex Studios - GoOS
//Copyright (C) 2022 Owen2k6
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program. If not, see <https://www.gnu.org/licenses/>.

namespace GoOS
{
Expand Down Expand Up @@ -401,6 +388,11 @@ protected override void Run()
log(ThemeManager.ErrorText, "Missing arguments");
break;
}
if (args[1].EndsWith(".gms"))
{
log(ThemeManager.ErrorText, "Files that end with .gms cannot be opened. they are protected files.");
break;
}
textcolour(ThemeManager.Default);
var editor = new TextEditor(Util.Paths.JoinPaths(currentdirfix, args[1]));
editor.Start();
Expand Down

0 comments on commit a6ed6fd

Please sign in to comment.