mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-05 11:34:07 +02:00
Make sure ScriptLoader uses correct root path
This commit is contained in:
parent
ee87841ec2
commit
3c43211b25
@ -7,7 +7,7 @@ namespace TweetDck.Resources{
|
|||||||
static class ScriptLoader{
|
static class ScriptLoader{
|
||||||
public static string LoadResource(string name){
|
public static string LoadResource(string name){
|
||||||
try{
|
try{
|
||||||
return File.ReadAllText(name,Encoding.UTF8);
|
return File.ReadAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory,name),Encoding.UTF8);
|
||||||
}catch(Exception ex){
|
}catch(Exception ex){
|
||||||
MessageBox.Show("Unfortunately, "+Program.BrandName+" could not load the "+name+" file. The program will continue running with limited functionality.\r\n\r\n"+ex.Message,Program.BrandName+" Has Failed :(",MessageBoxButtons.OK,MessageBoxIcon.Error);
|
MessageBox.Show("Unfortunately, "+Program.BrandName+" could not load the "+name+" file. The program will continue running with limited functionality.\r\n\r\n"+ex.Message,Program.BrandName+" Has Failed :(",MessageBoxButtons.OK,MessageBoxIcon.Error);
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user