Fix backslashes issue under Windows.
authorfunilrys <redacted>
Mon, 24 Feb 2020 17:34:08 +0000 (18:34 +0100)
committerfunilrys <redacted>
Mon, 24 Feb 2020 17:34:08 +0000 (18:34 +0100)
This patch fixes https://github.com/StevenBlack/hosts/pull/1165#issuecomment-590111613.

This patch simply, replace the `\` Windows directory separator, with the
universal `/` of the web convention.

updateHostsFile.py

index 3cce97a7246161b3b2baabe8903679984b2f6b1b..89e70c94467a750fd3a32b8005d96f21bf79f26b 100644 (file)
@@ -1071,7 +1071,7 @@ def write_opening_header(final_file, **header_params):
         final_file,
         "# Fetch the latest version of this file: "
         "https://raw.githubusercontent.com/StevenBlack/hosts/master/"
-        + path_join_robust(header_params["outputsubfolder"], "")
+        + path_join_robust(header_params["outputsubfolder"], "").replace("\\", "/")
         + "hosts\n",
     )
     write_data(
git clone https://git.99rst.org/PROJECT