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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colons in filenames #15

Open
noahheck opened this issue Jan 3, 2022 · 1 comment
Open

Colons in filenames #15

noahheck opened this issue Jan 3, 2022 · 1 comment

Comments

@noahheck
Copy link

noahheck commented Jan 3, 2022

We have a development team hosting VMs on a Windows system with source files shared across a VirtualBox shared folder. The naming convention for cache files across that share are not valid because they contain the colon (:) character as part of the filename key (e.g., :hits or :time ). Keys are established as Class Constants (e.g., https://github.com/sunspikes/php-ratelimiter/blob/master/src/Throttle/Throttler/FixedWindowThrottler.php#L32).

Microsoft docs (https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file) show a set of invalid filename characters, including the following:

  • < (less than)
  • > (greater than)
  • : (colon)
  • " (double quote)
  • / (forward slash)
  • \ (backslash)
  • | (vertical bar or pipe)
  • ? (question mark)
  • * (asterisk)

Can we update the key names to not include any reserved characters? My suggestion would be to use the _ (underscore) character for separation of the filename components, but I'm open for suggestions.

I'm happy to do this work and submit it back if it will be accepted.

@sunspikes
Copy link
Owner

Hello @noahheck really sorry that i missed this issue, sure you can submit a PR if you still have those changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants