diff options
author | ccalvarin <ccalvarin@google.com> | 2018-06-05 15:27:26 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-05 15:28:51 -0700 |
commit | ac69da0367e0dbd9aa13a332668af07dbb7a8135 (patch) | |
tree | 16b533129defbe15440c268e9a128c59cb88d4c3 /third_party | |
parent | 216afa160b0ccff3df3ccc3a41acbb9814e27989 (diff) |
Move path-manipulation functions to own library file.
Leave functions that make file accesses in the file library, and general blaze utilities in the blaze_util file, but move the functions that boil down to string manipulation and path formatting to their own file. (With the exception of getCWD, since absolute path syntax is relevant here.)
Doing this largely to consolidate all Windows path control into a single place, so that it's easier to notice inconsistencies. For instance, ConvertPath currently makes Windows paths absolute, but not Posix paths, and MakeAbsolute relies on this behavior. In addition, JoinPath assumes Posix path syntax, which leads to some odd looking paths. These will be fixed in a followup change.
(Found these issues while working on #4502, trying to fix the windows-specific system bazelrc.)
RELNOTES: None.
PiperOrigin-RevId: 199368226
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/ijar/BUILD | 4 | ||||
-rw-r--r-- | third_party/ijar/mapped_file_windows.cc | 2 | ||||
-rw-r--r-- | third_party/ijar/platform_utils.cc | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/third_party/ijar/BUILD b/third_party/ijar/BUILD index 96f4066c01..4460243653 100644 --- a/third_party/ijar/BUILD +++ b/third_party/ijar/BUILD @@ -30,7 +30,7 @@ cc_library( ] + select({ "//src:windows": [ "//src/main/cpp/util:errors", - "//src/main/cpp/util:file", + "//src/main/cpp/util:filesystem", "//src/main/cpp/util:logging", "//src/main/cpp/util:strings", ], @@ -59,7 +59,7 @@ cc_library( visibility = ["//visibility:private"], deps = [ "//src/main/cpp/util:errors", - "//src/main/cpp/util:file", + "//src/main/cpp/util:filesystem", "//src/main/cpp/util:logging", ], ) diff --git a/third_party/ijar/mapped_file_windows.cc b/third_party/ijar/mapped_file_windows.cc index 91bff719dd..1bcef8d7e0 100644 --- a/third_party/ijar/mapped_file_windows.cc +++ b/third_party/ijar/mapped_file_windows.cc @@ -18,8 +18,8 @@ #include <string> #include "src/main/cpp/util/errors.h" -#include "src/main/cpp/util/file_platform.h" #include "src/main/cpp/util/logging.h" +#include "src/main/cpp/util/path_platform.h" #include "src/main/cpp/util/strings.h" #include "third_party/ijar/mapped_file.h" diff --git a/third_party/ijar/platform_utils.cc b/third_party/ijar/platform_utils.cc index eeb4c40225..c73827d4b5 100644 --- a/third_party/ijar/platform_utils.cc +++ b/third_party/ijar/platform_utils.cc @@ -31,6 +31,8 @@ #include "src/main/cpp/util/file.h" #include "src/main/cpp/util/file_platform.h" #include "src/main/cpp/util/logging.h" +#include "src/main/cpp/util/path.h" +#include "src/main/cpp/util/path_platform.h" namespace devtools_ijar { |