Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transfer get of file with parens and spaces in name gives file not found #1

Closed
michael-conway opened this issue Mar 19, 2014 · 1 comment
Assignees
Labels

Comments

@michael-conway
Copy link
Collaborator

get oper of a file with name like /test/test/thisisaname (1).txt fails with file not found during transfer

Sharan at iPlant

@michael-conway michael-conway self-assigned this Mar 19, 2014
@michael-conway michael-conway modified the milestone: consortium-compatability Jun 24, 2014
@michael-conway michael-conway modified the milestones: idrop for jargon 4.0.2 release support - 4.0.2.1, consortium-tls 4.0.2.2 Feb 21, 2015
@michael-conway michael-conway modified the milestones: Maintenance release 4.0.2.2 includes iRODS 4.1, consortium-tls 4.0.2.3, 4.0.2.3 with iRODS 4.1 Apr 21, 2015
@michael-conway michael-conway modified the milestones: 4.0.2.3 with iRODS 4.1, Performance enhancements for streams and put/get - 4.0.2.4 May 22, 2015
michael-conway pushed a commit that referenced this issue Nov 2, 2015
michael-conway pushed a commit that referenced this issue Nov 9, 2015
michael-conway pushed a commit that referenced this issue Nov 9, 2015
@michael-conway michael-conway modified the milestones: Minor changes and compatibility - 4.0.2.4, mx release post tls 4.1.2 Nov 9, 2015
michael-conway pushed a commit that referenced this issue Nov 9, 2015
michael-conway pushed a commit that referenced this issue Nov 9, 2015
michael-conway pushed a commit that referenced this issue Nov 19, 2015
michael-conway pushed a commit that referenced this issue Nov 23, 2015
michael-conway pushed a commit that referenced this issue Nov 7, 2016
@michael-conway
Copy link
Collaborator Author

test case added, passes....

/**
	 * test for transfer get of file with parens and spaces in name gives file
	 * not found #1
	 * 
	 * @throws Exception
	 */
	@Test
	public final void testGetWithParensBug1() throws Exception {

		String testFileName = "testGetWithParensBug1 (1).txt";
		String absPath = scratchFileUtils
				.createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH);
		String localFileName = FileGenerator
				.generateFileOfFixedLengthGivenName(absPath, testFileName, 100);

		IRODSAccount irodsAccount = testingPropertiesHelper
				.buildIRODSAccountFromTestProperties(testingProperties);
		IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem
				.getIRODSAccessObjectFactory();

		String getFileName = "testGetResult.txt";
		String getResultLocalPath = scratchFileUtils
				.createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH + '/')
				+ getFileName;
		File localFile = new File(getResultLocalPath);

		String targetIrodsCollection = testingPropertiesHelper
				.buildIRODSCollectionAbsolutePathFromTestProperties(
						testingProperties, IRODS_TEST_SUBDIR_PATH);

		DataTransferOperations dataTransferOperations = accessObjectFactory
				.getDataTransferOperations(irodsAccount);
		dataTransferOperations
				.putOperation(
						localFileName,
						targetIrodsCollection,
						testingProperties
								.getProperty(TestingPropertiesHelper.IRODS_RESOURCE_KEY),
						null, null);

		DataObjectAOImpl dataObjectAO = (DataObjectAOImpl) accessObjectFactory
				.getDataObjectAO(irodsAccount);
		IRODSFile irodsFile = dataObjectAO
				.instanceIRODSFileForPath(targetIrodsCollection + '/'
						+ testFileName);

		dataObjectAO.getDataObjectFromIrods(irodsFile, localFile, null, null);

		assertionHelper.assertLocalFileExistsInScratch(IRODS_TEST_SUBDIR_PATH
				+ '/' + getFileName);
		assertionHelper.assertLocalScratchFileLengthEquals(
				IRODS_TEST_SUBDIR_PATH + '/' + getFileName, 100);

	}

michael-conway pushed a commit that referenced this issue Jan 6, 2017
michael-conway added a commit that referenced this issue Jan 10, 2018
michael-conway added a commit that referenced this issue Jul 30, 2018
michael-conway added a commit that referenced this issue May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant