Description
I uploaded a security.json file from a bare filename, manipulated the security config in the UI, then tried to download the modified file. The download failed.
This is the command used to upload:
/opt/solr/bin/solr zk cp security.json zk:/security.json -z localhost:9983
This is the command I tried that didn't work:
/opt/solr/bin/solr zk cp zk:/security.json security.json -z localhost:9983
If I change it to this, it works:
/opt/solr/bin/solr zk cp zk:/security.json ./security.json -z localhost:9983
The problem here is that it parses the local filename to extract the path component and then uses that to get a FileSystem object. With the bare filename, there IS no path info to be extracted, so it gets null and the code fails.
Instead, if the extracted path is null, it should use the current working directory as the path.