Skip to content

Empty directories are duplicated when deleted and added again #55

Closed

Description

@amosavian

When I delete a file a folder, then add a file with same name, I got duplicated entries with same name.

Activity

  1. abbeycode commented on Apr 21, 2017

    @abbeycode
    Owner

    Thanks for reporting this. Can you please take a look at the issue template I created and copy/paste into your issue? I could use the additional info requested there to figure out what's going on for you. I'm going to paste this into Issue #56 also.

  2. amosavian commented on Apr 22, 2017

    @amosavian
    ContributorAuthor

    Steps to reproduce:
    1- Add a file to zip with writeData:filePath:progress:error:
    2- Delete file using deleteFile:error:
    3- Readd same file using step 1
    4- List files using listFileInfo:
    Result of step 4 contains file 2 times.

    I can send testflight invitation of my app to check in beta version

  3. added a commit that references this issue on Apr 24, 2017
  4. abbeycode commented on Apr 24, 2017

    @abbeycode
    Owner

    I've pushed a test case into a branch that follows the code you described, but with correct results. Can you please update the test case so it fails in the way you're expecting?

  5. amosavian commented on Apr 24, 2017

    @amosavian
    ContributorAuthor

    Weird because I got it fixed now! or I may don't remember exact steps.
    Thanks

  6. amosavian commented on Apr 25, 2017

    @amosavian
    ContributorAuthor

    Finally I found the problem.
    1- create an empty folder, not file, using the code I made a pull request.
    2- delete that folder
    3- create an empty folder with same name again

    I think the problem occurs when data is empty, instance of [NSData data].

  7. abbeycode commented on Aug 8, 2017

    @abbeycode
    Owner

    Is this something you're still working on?

  8. abbeycode commented on Oct 7, 2017

    @abbeycode
    Owner

    @amosavian I'm going through open issues now, so you'll see me replying to a bunch of them. Sorry to hit you all at once :)

    Are you still taking a look at this, or should I close it out?

  9. amosavian commented on Oct 7, 2017

    @amosavian
    ContributorAuthor

    This problem still exists. This only occurs when I create folder in zip, not a regular file.

  10. abbeycode commented on Oct 7, 2017

    @abbeycode
    Owner

    So steps to reproduce are the following?

    1. In an archive add an empty directory (use [NSData data])
    2. Delete the directory created
    3. Create that directory again

    And then what happens at that point? Is an NSError returned?

  11. amosavian commented on Oct 7, 2017

    @amosavian
    ContributorAuthor

    No, when I list archive files at then end, I get entry twice. Indeed deleted directory revives somehow.

  12. added a commit that references this issue on Oct 11, 2017
  13. abbeycode commented on Oct 11, 2017

    @abbeycode
    Owner

    I created a test case again (this time it happens to be in Swift because the file with other writeData tests is in Swift. The test case is passing for me. Can you take a look again and see if we can modify it so it demonstrates your issue?

  14. 4 remaining items

  15. abbeycode commented on Oct 20, 2017

    @abbeycode
    Owner

    @amosavian Have you had a chance to look at the test case I set up?

  16. amosavian commented on Oct 21, 2017

    @amosavian
    ContributorAuthor

    I did

  17. abbeycode commented on Oct 22, 2017

    @abbeycode
    Owner

    I pushed an update with the trailing slash, and the case still passes

  18. abbeycode commented on Jul 2, 2019

    @abbeycode
    Owner

    I just updated the emptydir branch so the test case I wrote is on the latest v2.0 branch. Do you have any time to modify that test case to reproduce your issue in a PR?

  19. abbeycode commented on Aug 1, 2019

    @abbeycode
    Owner

    @amosavian I'm going to close this, since I haven't heard back from you in a while. Please feel free to reopen if you'd like to work with me on this at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions