When downloading a file with URI encoded symbol like #, the downloaded filename have the symbol replaced by %23.
I tried to push a branch with the correction but can't push it and do a pull request. So here are the changes I made to make it work for us:
in org.aarboard.nextcloud.api.webdav.File
public boolean downloadFile(String remotePath, String downloadDirPath) throws IOException {
boolean status = false;
String path = buildWebdavPath(remotePath);
Sardine sardine = buildAuthSardine();
File downloadFilepath = new File(downloadDirPath);
if (!downloadFilepath.exists())
{
downloadFilepath.mkdir();
}
if (fileExists(remotePath))
{
//Extract the Filename from the path
String[] segments = remotePath.split("/"); // Change is here remotePath instead of path
String filename = segments[segments.length - 1];
downloadDirPath = downloadDirPath + "/" + filename;
}
The modification was tested on 1.5.1 since 1.6.0 is broken atm.
When downloading a file with URI encoded symbol like #, the downloaded filename have the symbol replaced by %23.
I tried to push a branch with the correction but can't push it and do a pull request. So here are the changes I made to make it work for us: in org.aarboard.nextcloud.api.webdav.File
The modification was tested on 1.5.1 since 1.6.0 is broken atm.
Thanks.