-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Hello,
When I try to delete a file in the Jupyter UI it accidentally deletes similarly named files. For example, when I delete file, it also deletes file1 and file2.
To recreate:
1.) Update bucketname in the below code
2.) Run code
3.) In the Jupyter UI, try to delete 'file' that was just created
Result: 'file', 'file1', and 'file2' are removed
Expected Result: just 'file' should be removed
import numpy
from tensorflow.python.lib.io import file_io
from datetime import datetime
bucketname = 'myBucket'
print(datetime.now())
f = file_io.FileIO('gs://' + bucketname + '/file', "w")
numpy.savetxt(f, numpy.array(['1','2','3']), delimiter=',', fmt='%s')
f.flush()
f.close()
print(datetime.now())
f = file_io.FileIO('gs://' + bucketname + '/file1', "w")
numpy.savetxt(f, numpy.array(['1','2','3']), delimiter=',', fmt='%s')
f.flush()
f.close()
print(datetime.now())
f = file_io.FileIO('gs://' + bucketname + '/file2', "w")
numpy.savetxt(f, numpy.array(['1','2','3']), delimiter=',', fmt='%s')
f.flush()
f.close()