Giter Site home page Giter Site logo

Comments (7)

calmh avatar calmh commented on May 24, 2024

Yeah I don't know what we'd do better here. You can of course disable normalisation, but the problem with running without it is that Syncthing could sync a file from another device that has the same name but just differs in normalisation, which is both confusing on disk and also something we don't support since file names over the wire are normalised... i.e., there is literally no way to express a non-normalised filename in the wire protocol.

from syncthing.

stkw0 avatar stkw0 commented on May 24, 2024

Wouldn't it be possible to normalize it in the destination machine and not the source one? or keep a map (on ~/.cache let's say) with the non-normalized and normalized filename. The only problematic thing is to rename the file. If the normalized information can be stored in a different place it would be fixed, at least for my use case

from syncthing.

calmh avatar calmh commented on May 24, 2024

Syncthing is bidirectional; we'd have to know that an incoming notification about a (normalised) filename somehow applies to a different non-normalised name on disk. Separate cache files and stuff is not a thing we do, for a variety of reasons (complexity and race conditions among them).

from syncthing.

stkw0 avatar stkw0 commented on May 24, 2024

Yes, if there are not enough use cases I understand it could be too complex to modify the core just for this. Thinking about a different solution. Would it work to have an option to create a symlink (maybe a hard symlink?¿) with the normalized name that points to the non-normalized name (instead of just renaming)?

from syncthing.

calmh avatar calmh commented on May 24, 2024

A hard link should work, possibly, if you disable the auto normalisation.

from syncthing.

stkw0 avatar stkw0 commented on May 24, 2024

I see. If syncthing could have two option to handle non-normalized filenames and in case of hardlinks could ignore the non-normalized filename if there exist also a normalized version it would be neat. Never tried to dig into the source code. I guess that it being a very special use case it would be of very low priority, but at some point I could try to open a PR if that's okay.

from syncthing.

calmh avatar calmh commented on May 24, 2024

I think disabling auto normalisation should give you that behavior. If it does not, I think it's way too detailed and niche a knob for us to have and maintain, honestly. I hope this solves your issue!

from syncthing.

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.