Coder Social home page Coder Social logo

Comments (4)

oniony avatar oniony commented on May 25, 2024

The symlinkTargetName and symlinkTargetNameNoExt were added at the request of another user who was trying to use TMSU with Git Annex.

Yes it would be possible to fall back to regular hashing in the case of regular files but as you have expressed this would be somewhat hard to configure with the current set-up. One solution is the comma-seperated list of preferences as you proposed; another would be to split out the configuration of the hash algorithm for each type of file. Already TMSU allows files and directories to be configured separately so perhaps this could be extended to allow symbolic links to be separately configured?

from tmsu.

oniony avatar oniony commented on May 25, 2024

In the best case, tmsu could also fall-back to its regular behavior when the file is a symlink, but the target name is not β€œspecial”.

This would be a lot more complex to implement and configure but I will have a think about how it could work.

from tmsu.

oniony avatar oniony commented on May 25, 2024

So what I've done is to:

  1. Remove support for the symlinkTargetName and symlinkTargetNameNoExt values of the fileFingerprintAlgorithm setting.
  2. Added a new setting called symlinkFingerprintAlgorithm with the following possible values:
    • none -- use empty fingerprints
    • follow -- use the fingerprint of the target file (default)
    • targetName -- use the target file's name
    • targetNameNoExt -- use the target file's name with the extension removed
  3. Added automatic upgrade logic to populate symlinkFingerprintAlgorithm where fileFingerprintAlgorithm is currently symlinkTargetName or symlinkTargetNameNoExt. The only thing to note with this is that it will also then delete the fileFingerprintAlgorithm setting such that the default will be used for regular files.
  4. Updated the wiki.

from tmsu.

eigengrau avatar eigengrau commented on May 25, 2024

This makes the symlink handling more consistent! Thanks! πŸ‘

from tmsu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.