android-library icon indicating copy to clipboard operation
android-library copied to clipboard

File not Found after upgrade from 2.7.0 to 2.19.0 (2.8.0)

Open Toprakete opened this issue 1 year ago • 0 comments

Hi, I want to list files of a folder. I did this with:


public boolean requestFileList() {
	ReadFolderRemoteOperation refreshOperation;
	// prepare client
	prepare();
	// request
	if (TextUtils.isEmpty(mFolder)) {
		refreshOperation = new ReadFolderRemoteOperation(FileUtils.PATH_SEPARATOR);
	} else {
		refreshOperation = new ReadFolderRemoteOperation(FileUtils.PATH_SEPARATOR + mFolder);
	}

	refreshOperation.execute(mClient, new OnRemoteOperationListener() {
		@Override
		public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
			if (!result.isSuccess()) {
				mProjectHandlerDelegate.projectDataDownloadFailed(result.getHttpCode(), result.getLogMessage());
			} else {
				// create db filelist
				processFileList ((ReadFolderRemoteOperation)operation, result);
			}
		}
	}, mHandler);
}

private void prepare()
{
	// already inited?
	if (mClient != null) return;
	// create client
	Uri serverUri = Uri.parse(mServer);
	mClient = OwnCloudClientFactory.createOwnCloudClient(serverUri, getContext(), true);
	mClient.setCredentials(
			OwnCloudCredentialsFactory.newBasicCredentials(
					mLogin,
					mPassword
			)
	);
}

This worked fine, until I upgraded to 2.19.0 (it happens already in 2.8.0). The result is then 404, File not Found As I saw the the query url has a null where the userid should be. How can I fix this? Thx and br Klaus

Toprakete avatar Jul 26 '24 11:07 Toprakete