Skip to content

Commit

Permalink
Merge pull request #57 from Gml-Launcher/develop
Browse files Browse the repository at this point in the history
Use LocalPath and refine folder name validation
  • Loading branch information
GamerVII-NET authored Nov 28, 2024
2 parents ea839a6 + e736324 commit e2215d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Gml.Launcher/Views/Pages/SettingsPageView.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ private async void OpenFileDialog(object? sender, RoutedEventArgs e)

if (folders.Count != 1) return;

var path = folders[0].Path.AbsolutePath;
var path = folders[0].Path.LocalPath;

if (path.Any(c => !char.IsLetter(c) || !char.IsLower(c) || c > 'z'))
if (path.Any(char.IsWhiteSpace))
{
throw new Exception("Invalid folder name");
}
Expand Down

0 comments on commit e2215d6

Please sign in to comment.