Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

directories with spaces in names 'one more' are converted to "onespacemore" #39

Closed
cipy opened this issue Jul 6, 2021 · 9 comments
Closed
Labels
bug Something isn't working

Comments

@cipy
Copy link

cipy commented Jul 6, 2021

then saved backed into JSON as "space" 馃憥馃徎

@cipy
Copy link
Author

cipy commented Jul 6, 2021

. goes "dot"

@mgree mgree added the bug Something isn't working label Jul 6, 2021
@mgree
Copy link
Owner

mgree commented Jul 6, 2021

So we need some renaming: . and .. are not legal filenames on any system, and other systems have other special characters. The current policy is in config.rs. I'm definitely not doing the right thing, though! 馃槗 Thoughts on what it should be instead?

I fixed the saving behavior in 726a175, where names should get properly restored. Can you try using a latest build?

@cipy
Copy link
Author

cipy commented Jul 6, 2021

I tested with yaml since I can yank/see the wrong lines faster; the bug seems to be still there. thanks,

@mgree
Copy link
Owner

mgree commented Jul 6, 2021

Can you give me a concrete file that goes wrong, and tell me what you expect it to do?

@cipy
Copy link
Author

cipy commented Jul 7, 2021

nothing more than:

  1. creating a new file '{}' by hand (btw: --new gives an error)
  2. the loading ffs with it, -o anotherfile
  3. create directories containing spaces in their name "some thing"
  4. umount, go to 2.
  5. all directories have now "somespacething" and files somedotsh

btw, is it possible to compare against '.' and '..' and remove them from dir list?

@mgree
Copy link
Owner

mgree commented Jul 7, 2021

Can you please create a new issue with (a) how you're invoking ffs --new and (b) the error you're getting?

Just to check: in (4), by "go to 2" you mean load anotherfile in ffs?

What do you mean by "remove them from the dir list"? It's important that calls to readdir return those entries. Did you mean just filtering out . and .. named properties?

@cipy
Copy link
Author

cipy commented Jul 7, 2021

Yes, filtering.

@mgree
Copy link
Owner

mgree commented Jul 7, 2021

Got it. My plan is the following:

  • cfb8790 do as little name munging as possible (we can just keep spaces, etc.)
  • cfb8790 rename . and .. files to something clear _. and _.., respectively
  • f2dc69a add options to control whether entries with bad names are munged or filtered
  • fed1a4e test filenames with spaces

I'm thinking --munge rename or --munge filter to control things. I think I'd rather have renaming be the default, so that the data are at least there.

I'm going to merge #41 now---please download a new latest once it's built and test things out.

@mgree
Copy link
Owner

mgree commented Jul 8, 2021

The development pre-release builds are up for Linux and macOS. I'll have another official release out soon.

Closing this issue for now. If it's still not working for you, please post:

  1. A non-empty YAML file that ffs mounts incorrectly.
  2. An explanation of how you wish it was mounted.

@mgree mgree closed this as completed Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants