-
Notifications
You must be signed in to change notification settings - Fork 865
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
Store files in the proper location on Windows. #1656
Comments
Thanks, @MicahZoltu - we'll bring this up in our next weekly triage. |
Did some spelunking on borrowed Windows 10 laptop and (
For sure there are historical reasons for this, but this naming convention is pretty awkward. Anyway, IPFS Desktop creates: When installed only for current user
When installed for all usersafaik same, with one difference:
iiuc the main issue here is with the first two, namely we have those ugly folders in My thoughts:
@MicahZoltu does this sound sensible? Let me know if I missed some nuance. I'm open for reviewing a PR if someone familiar with Windows creates one. |
A
Something to be aware of is that Electron's default locations are bad and you should not assume that Electron will put data in the right place by default. Electron by default considers hundreds of megabytes of cache data to be "app config" and it stores it in a location that is network synced/backed up. Given this, I recommend moving the Electron stuff to In general, my advice is to use |
Thank you @MicahZoltu, that is very useful feedback. Did some digging and there are three separate topics here, each can be tackled separately: On replacing
|
I submitted an issue to get I believe there are other similar libraries that better support different data types so if the author of
My concern with this strategy is that this issue has been open with Electron for almost 4 years now, and until they fix it the default of Electron is to be a bad citizen. This means that IPFS Desktop will continue to be a bad citizen indefinitely, since there is no light at the end of the tunnel for Electron fixing the issue. That being said, I understand your position and appreciate you clearly laying out why you are weakly opposed to it. I certainly don't envy the maintainers of IPFS Desktop being put in this situation. All in all, I agree with all 3 of your suggested paths forward. They are prudent and get things to a better place eventually without risking too much code complexity or breakage along the way. |
As an intermediate step, can we get a configuration option added that will allow me to tell IPFS Desktop where to write? It seems that Electron has no intention of fixing this (going on 5 years open bug with no activity) and IPFS is probably the worst offender if you actively use it and pin with it (I'm looking at 2GB of "cache data" in my .ipfs folder right now). |
Note: I tried setting |
It seems that after first launch the path is stored in |
Thank you @MicahZoltu, this is useful feedback.
We don't have bandwidth for doing going this extra mile on top of Electron defaults, |
I suspect that Linux users would also like to see this fixed to respect XDG_CONFIG paths, and I think OSX similarly has some feature for defining where cache files go. The solution will likely be a bit different for each platform, so it does seem like fixing each separately may make the most sense (especially if you are looking to outsource the work). |
Extracting action plan for most valuable fix for Windows users (#1862):
Only caveat here is to do some magic similar to #1656 (comment) (need someone to check if that still makes sense) to ensure change applies to new installs and does not break repos of existing users. |
Describe the bug
Installing IPFS Desktop on Windows results in folders in %USERPROFILE% as well as cache and DB files in the roaming profile.
To Reproduce
Steps to reproduce the behavior:
.ipfs
and.ipfs-desktop
folder in%USERPROFILE%
and%APPDATA/IPFS Desktop
contains cache files, databases, blob storage, etc.Expected behavior
Cache files, file storage, databases, and per-machine configuration should all be stored in
%LOCALAPPDATA%/ipfs/
. Per user configuration (I'm not sure if IPFS has any of this, maybe the list of pinned files?) should be stored in%APPDATA%/ipfs/
. Nothing should be stored in%USERPROFILE%
(aka:%HOME%
) unless the user *explicitly tells the app to do so such as via a save dialog box.Additional context
Both Linux and OSX also have environment variables that instruct applications where the appropriate place for files is. I believe it is called XDG_CONFIG though I'm not personally familiar with it.
The text was updated successfully, but these errors were encountered: