Deduplicate pathToVault.resolve("d").resolve("xx").resolve("yyyyyy...y")

Open
#100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
java

Research direction

Search the project for the repeated pathToVault.resolve(...) expression and the dirHash calculation, then compare the places where both are used. The work is done when those call sites share a clean existing or injectable location rather than a new standalone utility class.

Written by the indexing model from the issue text.

Description

The expression pathToVault.resolve(Constants.DATA_DIR_NAME).resolve(dirHash.substring(0, 2)).resolve(dirHash.substring(2)) (or similar) is used in several places in this project. We should find a (clean!) way to deduplicate this (possibly including the dirHash calculation).

By "clean", I mean not just a new util class. Maybe we find some existing place, that can be injected (or is already present) in all required places.

Dominant language
Java
Stars
110
Forks
39
Avg merge
1d 28m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cryptomator/cryptofs

All issues in cryptomator/cryptofs

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.