diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 3f623de..35b58ee 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -1715,14 +1715,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1715 | FileMode.Open, FileAccess.Read)) | 1715 | FileMode.Open, FileAccess.Read)) |
1716 | { | 1716 | { |
1717 | tfs.Read(tdata, 0, tdata.Length); | 1717 | tfs.Read(tdata, 0, tdata.Length); |
1718 | tfs.Close(); | ||
1719 | } | 1718 | } |
1720 | 1719 | ||
1721 | assem = new System.Text.ASCIIEncoding().GetString(tdata); | 1720 | assem = new System.Text.ASCIIEncoding().GetString(tdata); |
1722 | } | 1721 | } |
1723 | catch (Exception e) | 1722 | catch (Exception e) |
1724 | { | 1723 | { |
1725 | m_log.DebugFormat("[XEngine]: Unable to open script textfile {0}, reason: {1}", assemName+".text", e.Message); | 1724 | m_log.ErrorFormat( |
1725 | "[XEngine]: Unable to open script textfile {0}{1}, reason: {2}", | ||
1726 | assemName, ".text", e.Message); | ||
1726 | } | 1727 | } |
1727 | } | 1728 | } |
1728 | } | 1729 | } |
@@ -1739,16 +1740,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1739 | using (FileStream fs = File.Open(assemName, FileMode.Open, FileAccess.Read)) | 1740 | using (FileStream fs = File.Open(assemName, FileMode.Open, FileAccess.Read)) |
1740 | { | 1741 | { |
1741 | fs.Read(data, 0, data.Length); | 1742 | fs.Read(data, 0, data.Length); |
1742 | fs.Close(); | ||
1743 | } | 1743 | } |
1744 | 1744 | ||
1745 | assem = System.Convert.ToBase64String(data); | 1745 | assem = System.Convert.ToBase64String(data); |
1746 | } | 1746 | } |
1747 | catch (Exception e) | 1747 | catch (Exception e) |
1748 | { | 1748 | { |
1749 | m_log.DebugFormat("[XEngine]: Unable to open script assembly {0}, reason: {1}", assemName, e.Message); | 1749 | m_log.ErrorFormat( |
1750 | "[XEngine]: Unable to open script assembly {0}, reason: {1}", assemName, e.Message); | ||
1750 | } | 1751 | } |
1751 | |||
1752 | } | 1752 | } |
1753 | } | 1753 | } |
1754 | 1754 | ||
@@ -1761,9 +1761,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1761 | using (StreamReader msr = new StreamReader(mfs)) | 1761 | using (StreamReader msr = new StreamReader(mfs)) |
1762 | { | 1762 | { |
1763 | map = msr.ReadToEnd(); | 1763 | map = msr.ReadToEnd(); |
1764 | msr.Close(); | ||
1765 | } | 1764 | } |
1766 | mfs.Close(); | ||
1767 | } | 1765 | } |
1768 | } | 1766 | } |
1769 | 1767 | ||