Coder Social home page Coder Social logo

os error 123 in Windows 10 about fclones HOT 6 CLOSED

pkolaczk avatar pkolaczk commented on September 25, 2024
os error 123 in Windows 10

from fclones.

Comments (6)

pkolaczk avatar pkolaczk commented on September 25, 2024

I'm afraid Windows default shell doesn't expand wildcards.
https://superuser.com/questions/460598/is-there-any-way-to-get-the-windows-cmd-shell-to-expand-wildcard-paths

You can use a combination of -R and --paths ... or --names ... to perform globbing with the builtin glob/regex support.

from fclones.

PeWu avatar PeWu commented on September 25, 2024

Could you fix the documentation and error message? The current error message is quite misleading.

from fclones.

pkolaczk avatar pkolaczk commented on September 25, 2024

The error message is created from the template: Failed to stat <path>: <reason>
The second part (reason) after the colon comes from the operating system. I can't fix it.

I can improve only the first part a bit. I guess "stat" is a Unix/Linux only thing.
What about Failed to read metadata of <path>: <reason> ?

from fclones.

PeWu avatar PeWu commented on September 25, 2024

I don't think changing wording would help much. I wouldn't have guessed that the program is trying to use '*' as a file name. And even if I realized what the program tried to do, I wouldn't know what to do about it.

You could do something like:

if path contains '*':
  log warning 'It looks like your shell does not support expanding wildcards. Try using --paths or --names. See https://git.io/JJCLH for more information.'

from fclones.

pkolaczk avatar pkolaczk commented on September 25, 2024

I like your suggesion, although I can imagine the warning could be also wrong and misleading - there is no reliable way of determining if the given file system accepts * (or any other character) as part of the path. E.g. on Linux * is a perfectly valid character in a path. The tool does not know if the user wanted to treat * as a wildcard, or maybe they wanted a literal *.

I can also imagine the above code could raise the warning even under shells that do support wildcard expansion.
E.g. this is a valid command under bash:
fclones -R '*' (search all contents in the directory named * )

from fclones.

PeWu avatar PeWu commented on September 25, 2024

Thanks :)

from fclones.

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.