tensorflow: tf.io.gfile.listdir is inconsistent between GCS dir and local dir - adds trailing slashes
System information
- TensorFlow version (use command below): v2.0.0-rc2-26-g64c3d38 2.0.0
- Python version: 3.6
Describe the current behavior
When listing the directory items for a GCS dir, listdir returns names with trailing slashes. When listing the directory items for a local dir, listdir returns names without trailing slashes.
Describe the expected behavior
The behavior needs to be consistent.
Standalone code to reproduce the issue
tensorflow.io.gfile.listdir('gs://bucket/dir')
>>> ['eval/', 'train/']
tensorflow.io.gfile.listdir('..')
>>> ['eval', 'train']
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 19 (2 by maintainers)
I’ve tested this on 2.2.0. It’s still broken.