Fix bug in _basename. I accidentally used a backslash on Linux and forwardslash on Windows.

PiperOrigin-RevId: 294929053
Change-Id: Ic7e77b415406e1429e970006c3b14ef5ccd586a8
This commit is contained in:
A. Unique TensorFlower
2020-02-13 09:11:42 -08:00
committed by TensorFlower Gardener
parent bf2dda9d90
commit 4de896db9f

View File

@@ -855,7 +855,7 @@ def _basename(repository_ctx, path_str):
is_win = is_windows(repository_ctx)
for i in range(num_chars):
r_i = num_chars - 1 - i
if (is_win and path_str[r_i] == "/") or path_str[r_i] == "\\":
if (is_win and path_str[r_i] == "\\") or path_str[r_i] == "/":
return path_str[r_i + 1:]
return path_str