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

Test to copy directory with files with same name prefix #1

Closed

Conversation

john-jam
Copy link
Owner

One test case in gcsfs had a weird behavior where copying a folder also copied the files that has the same name prefix as the folder name. For example:

# Files
# -- subdir.txt
# -- subdir
# ---- subfile.txt

fs.cp("subdir", "target")

# Expected target folder content: ["subfile.txt"]

# Content with gcsfs: ["subdir.txt", "subdir/subfile.txt"]

This PR fixes this behavior. I guess there's a better way to fix this but I had to also remove the _glob method for it to work so the _glob method from the async fs is used.

@ianthomas23 @martindurant I created a PR here for now since I need the updates from this other PR for it to work. I'll create a PR with gcsfs master branch as the target as soon as the other one is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant