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

Support drives other than C:\ on Windows #4

Closed
wants to merge 2 commits into from

Conversation

neojp
Copy link

@neojp neojp commented Jul 14, 2019

Edited filesystem.js functions to support Windows drives

  • getDirectoryContents shows a list of Windows drives when requested / root path
  • Subsequent paths will be formatted as /<drive letter>/<path>. Eg. /c/Users/neojp/Desktop/archive.bcup
  • A new function normalizeWindowsPath will convert server request paths into resolved Windows paths
    /c/Users/neojp/Desktop/archive.bcup -> c:\\Users\\neojp\\Desktop\\archive.bcup

Fixes #3
Fixes buttercup/buttercup-desktop#708
Fixes buttercup/buttercup-browser-extension#206
Fixes buttercup/buttercup-browser-extension#232

Edited `filesystem.js` functions to support Windows drives
- `getDirectoryContents` shows a list of Windows drives when requested `/` root path
- Subsequent paths will be formatted as `/<drive letter>/<path>`. Eg. `/c/Users/neojp/Desktop/archive.bcup`
- A new function `normalizeWindowsPath` will convert server request paths into resolved Windows paths
  `/c/Users/neojp/Desktop/archive.bcup` -> `c:\\Users\\neojp\\Desktop\\archive.bcup`

Fixes buttercup#3
Copy link
Member

@perry-mitchell perry-mitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's the unfortunate problem that users with existing archives will not have the drive letter saved in their current paths. To prevent breaking their configurations and having them to destroy and re-add them, could we make it so that paths without the drive letter default to /c/?

@neojp
Copy link
Author

neojp commented Jul 16, 2019

Good catch. Let me try that out.

@perry-mitchell
Copy link
Member

@neojp Have you had a chance to check on the request I made? If not I could try to tackle it..

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