Skip to content

Conversation

@VinceOPS
Copy link

@VinceOPS VinceOPS commented Jul 20, 2017

https://issues.apache.org/jira/browse/CB-6938

Platforms affected

iOS, all versions.

What does this PR do?

It fixes CB-6938.
Instead of returning an error 12 (PATH_EXISTS_ERR), it tries to remove the existing file, then to copy the "new" one.

What testing has been done on this change?

Simulator: iPhone 5 and iPhone 6 @ iOS 9, 10.
Real device: iPhone 5 @ iOS 10.

No unit test provided nor written.

Checklist

  • Reported an issue in the JIRA database
  • Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
  • Added automated test coverage as appropriate for this change.

Copy link
Contributor

@filmaj filmaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a look, we should probably add a case handling the failure. As well, what can we do to add test coverage for this behaviour? Just so we don't regress in the future.

// first try to remove the existing file
bSuccess = [fileMgr removeItemAtPath:newFileSystemPath error:&error];

if (bSuccess) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should be done in the case removal of the item fails?

@janpio
Copy link
Member

janpio commented Oct 1, 2018

Hey, I just fixed the problem that caused Android tests to fail in master. Could you rebase this PR please? This should get rid of the Android failures and possibly fix all test failures for this PR.

@janpio janpio changed the title CB-6938: (fix) on iOS, copyTo should overwrite any existing file fix(ios): copyTo should overwrite any existing file (CB-6938) Jul 4, 2019
@janpio janpio closed this Jul 4, 2019
@janpio
Copy link
Member

janpio commented Jul 4, 2019

Rerun with current test configuration.

@janpio janpio reopened this Jul 4, 2019
@janpio janpio closed this Jul 4, 2019
@janpio
Copy link
Member

janpio commented Jul 4, 2019

CI: Once more please.

@janpio janpio reopened this Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants