remove tmp file after editing

master
Tibor Csötönyi 4 years ago
parent 07ced678c6
commit 6bbd71a1d1
  1. 5
      .gitignore
  2. 4
      README.md
  3. 7
      main.cpp

5
.gitignore vendored

@ -0,0 +1,5 @@
/Release
/x64
/.vs
/*.user
/*.tlog

@ -18,4 +18,6 @@ Again, please keep in mind that this is a 2-hour dirt work of a guy who never wo
- Append your host name behind the link path (L2Launcher.exe [hostname]).
-> Example: C:\Path\To\LineageII\L2Launcher.exe example.com
**Created in Visual Studio 2019**
- Run as administrator!
**Created in Visual Studio 2019 Community Edition**

@ -21,9 +21,12 @@
* - For Lineage II versions >= High Five: rename system/L2.bin -> system/L2.exe
* - Create a link to the L2Launcher on your desktop.
* - Append your host name behind the link path (L2Launcher.exe [hostname]).
*
* -> Example: C:\Path\To\LineageII\L2Launcher.exe example.com
*
* - Run as administrator!
*
*
*
* This is a VERY simple and unsafe way to start Lineage II using Windows host name resolving.
* It's a quick and dirty way, please feel free to fix stuff I might have forgotten or coded badly.
*
@ -95,6 +98,8 @@ void copy_hosts(std::string const& hosts_path)
// close files
hosts_of.close();
hosts_tmp_if.close();
remove("hosts_tmp");
}
else {
throw std::runtime_error("I either couldn't read the hosts file or couldn't write the temporary file in this folder. Please restart this program as administrator. Exiting.\n");

Loading…
Cancel
Save