Navigation Menu

Skip to content

Commit

Permalink
Fixed bug where I used filename from editor tab in upload tab.
Browse files Browse the repository at this point in the history
  • Loading branch information
hwiguna committed Dec 9, 2014
1 parent 4a6f037 commit d8595a6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -143,12 +143,13 @@ private void UploadButton_Click(object sender, EventArgs e)
{
//Open Text file
string origFile = System.IO.File.ReadAllText(FilePathTextbox.Text);
string targetFileName = Path.GetFileName(FilePathTextbox.Text);

string luaCode = string.Format(
"file.remove(\"{0}\")\r\n" +
"file.open(\"{0}\",\"w\")\r\n" +
"{1}" +
"file.close()\r\n", LuaFilenameTextbox.Text, WrapInWriteLine(origFile));
"file.close()\r\n", targetFileName, WrapInWriteLine(origFile));

SendLines(luaCode);
}
Expand Down
Expand Up @@ -144,4 +144,7 @@ end)</value>
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>157, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>293, 17</value>
</metadata>
</root>
Binary file not shown.

0 comments on commit d8595a6

Please sign in to comment.