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

Add --keep-file-path #615

Merged

Conversation

tahirhajizada
Copy link
Contributor

@tahirhajizada tahirhajizada commented Oct 29, 2019

Fix #611

@CLAassistant
Copy link

CLAassistant commented Oct 29, 2019

CLA assistant check
All committers have signed the CLA.

@codecov-io
Copy link

codecov-io commented Oct 29, 2019

Codecov Report

Merging #615 into master will decrease coverage by 0.04%.
The diff coverage is 78.94%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #615      +/-   ##
============================================
- Coverage     76.35%   76.31%   -0.05%     
- Complexity      606      610       +4     
============================================
  Files            81       81              
  Lines          2284     2297      +13     
  Branches        324      327       +3     
============================================
+ Hits           1744     1753       +9     
- Misses          323      324       +1     
- Partials        217      220       +3

@tahirhajizada tahirhajizada force-pushed the feature/preserve-original-path branch from 3ce5c10 to 8683736 Compare October 29, 2019 13:46
@bootstraponline
Copy link
Contributor

Thanks for submitting a pull request! I'll take a look soon.

README.md Outdated

## Downloaded files preserves the original path of file. Required when file names are not unique.
## Default: false
# preserve-original-path: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for working on this! What do you think of keep-file-path for the key name?

@@ -16,12 +17,16 @@ data class ObjPath(
val objName = parsed.getName(0).toString()
val shardName = parsed.getName(1).toString()
val deviceName = parsed.getName(2).toString()
val filePathName = if (parsed.nameCount > 4) {
parsed.subpath(3, parsed.nameCount - 1).toString()
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think of parsed.parent.drop(3).joinToString("/") as a way to simplify the parsed.subpath logic?

@bootstraponline
Copy link
Contributor

I'm happy to make the suggested changes if that'd be easier.

@tahirhajizada
Copy link
Contributor Author

I am ok with your suggestions. Makes sense. It would be nice if you apply them or I can do after 9-10 hours :)

@bootstraponline
Copy link
Contributor

Sounds good. I'll apply the fixes in ~4 hours after work.

Update readme with new toggle

add toggle to android flank yml

Add cli command and tests for preserve-original-path
@bootstraponline bootstraponline force-pushed the feature/preserve-original-path branch 2 times, most recently from 39a9814 to a184d47 Compare November 1, 2019 05:04
@bootstraponline bootstraponline changed the title Feature/preserve original path Add --keep-file-path Nov 1, 2019
Rename preserveOriginalPath to keepFilePath

Update release_notes.md
@bootstraponline bootstraponline force-pushed the feature/preserve-original-path branch from a184d47 to 505f0d6 Compare November 1, 2019 05:10
@bootstraponline bootstraponline merged commit 4f0d4a3 into Flank:master Nov 1, 2019
@bootstraponline
Copy link
Contributor

I updated, tested, and merged your pull request! Nice work.

I released Flank v8.1.0 with the feature and updated the change log.

Thanks for contributing.

@tahirhajizada
Copy link
Contributor Author

Thank you for the changes and release. Welcome.

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.

Option to preserve directory paths
4 participants