steffenfritz / FileTrove

FileTrove indexes files and creates metadata from them.
https://filetrove.fritz.wtf
GNU Affero General Public License v3.0
37 stars 5 forks source link

[CHANGE] Use generic path operations #44

Closed ross-spencer closed 8 months ago

ross-spencer commented 8 months ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

In the example here: https://github.com/steffenfritz/FileTrove/blob/5e5c16b19c5d5a9eab840331619889f82891a329/nsrl.go#L120 the database is installed at `install+"db/nsrl.db".

To improve portability, it can be rewritten with the import path/filepath and function call filepath.Join(install, "db", "nsrl.db"). The same or similar patterns should be adopted across the code where paths are being written.

Describe the solution you'd like A clear and concise description of what you want to happen.

As per above.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

It is possible to leave as-is but it may cause headaches down the line as the utility becomes more popular.