Skip to content

Commit

Permalink
Merge pull request #14 from beyluta/fix-open-file-crash
Browse files Browse the repository at this point in the history
Fix open file crash
  • Loading branch information
beyluta authored Sep 13, 2022
2 parents be9940c + f3350a0 commit 1a90562
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions Abstract/WidgetWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,17 @@ public void SetWindowTransparency(IntPtr handle, byte alpha)
/// <returns>The value inside the content attribute</returns>
public string GetMetaTagValue(string name, string widgetPath)
{
string[] html = File.ReadAllLines(widgetPath);
for (int i = 0; i < html.Length; i++)
try
{
if (html[i].Contains("meta") && html[i].Contains(name) && !html[i].Contains("<!--"))
string[] html = File.ReadAllLines(widgetPath);
for (int i = 0; i < html.Length; i++)
{
return html[i].Split('"')[3];
if (html[i].Contains("meta") && html[i].Contains(name) && !html[i].Contains("<!--"))
{
return html[i].Split('"')[3];
}
}
}
} catch { return null; }
return null;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.1.1"
"version": "1.1.2"
}
2 changes: 1 addition & 1 deletion Classes/WidgetAssets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ static class WidgetAssets

static public string[] GetPathToHTMLFiles(string path)
{
return Directory.GetFiles(path, "*.html");
return Directory.GetFiles(path, "*.html", SearchOption.AllDirectories);
}

static public void CreateHTMLFilesDirectory()
Expand Down

0 comments on commit 1a90562

Please sign in to comment.