Coder Social home page Coder Social logo

Comments (4)

tobiasKaminsky avatar tobiasKaminsky commented on September 25, 2024

Subscribing myself, as I think this is then also a task for clients.

  • If server returns a specific error message, clients should show a correct info
  • if setting is enabled via capabilities, clients can directly prohibit renaming/creating such a file

from server.

susnux avatar susnux commented on September 25, 2024

@tobiasKaminsky we need this implemented / fixed on the clients, server and WebUI are already done:

Implementation: Get the capability "forbidden_filename_characters" from the files app. This is an array of forbidden characters (could be multibyte characters, so it is an array of strings). If any of the strings in the array matches the filename it is considered invalid.

from server.

SystemKeeper avatar SystemKeeper commented on September 25, 2024

Besides some characters not allowed on windows, there are more rules that need to be taken into account, e.g. a Filename is also not allowed to end with a dot or a space. There are also some reserved filenames.
See https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions for details.

from server.

susnux avatar susnux commented on September 25, 2024

Yes but having the forbidden characters implemented in clients is a good first step and also allows to configure other compatibility (like with some filesystems that forbid just :).

See https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions for details.

This is also only partially true, Windows supports a lot of naming things, but the Explorer simply does not, like trailing . is working just win32 API needs the ? flag to disable path normalization (and of course Explorer fails to handle it).
Just like with Mac where some buggy GUI application forbid files with colon in the name, while on OS layer this is pretty fine.

But we probably should still enforce the character + the trailing space / dot rules. About the path length we can not do much, that depends on the users mount point and file type (e.g. for spreadsheets the table name counts into the path length 🀦).

from server.

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.