Open vishalnandagopal opened 8 months ago
Current workaround is to set PAISA_CONFIG
env variable, but ideally paisa should default to storing it in an expected and familiar folder, where most apps store their data.
Thanks for reporting, I didn't know about this issue. I keep the config file in the documents folder because it stores things like import templates etc, losing it would be very bad. Documents folder would also be more visible and easy to backup.
Let me see if I can do something about the issue.
I think paisa_config is not something the user backups a lot, the ledger is way more important.
@maacl There is a workaround available for this, you can set the PAISA_CONFIG environment variable and paisa will look there, you can check the configuration docs. I still believe the problem is because Paisa is not a signed application, Microsoft is classifying it as an unfriendly application
. I consider the ledger journals as documents and the document folder is the ideal fit. But that said, let me think through it and see if a fallback can be added if document folder is not accessible.
I still believe the problem is because Paisa is not a signed application, Microsoft is classifying it as an unfriendly application
@ananthakumaran , the problem will not be solved even if Paisa is a signed app. Windows does not allow anyone to create/edit files in protected folders, unless the user themselves whitelists the app and gives them access to all protected folders. In fact, you have to even whitelist explorer.exe, the Windows Explorer to create files/folders in protected folders.
Documents folder is not something that the user can remove from protection. It is added by default and cannot be removed.
I have seen other signed apps like 7z, peazip, VSCode, etc have issues with Documents folder, so it is not something a signing certificate will solve.
I consider the ledger journals as documents and the document folder is the ideal fit.
Hey, I agree. The documents folder would be the ideal default fit for the ledger, since it is supposed to be exposed to the user. However, the problem is with paisa.yaml here. It should store internal config files in the Windows AppData folder.
It can be opened by a button in the app itself, such as "Open config". This way, you can open the config and change the path for the ledger and the other stuff. However, the location of the config file remains unchanged.
Other apps that follow this:
VSCode
settings.json
, it's config file is stored in app data
SumatraPDF
Clicking advanced options opens the config file in your text editor.
Describe your Environment OS: Windows 11 Paisa Version: 0.5.7 App Variant: Desktop
Describe the bug The paisa app allows users to store their journal and db in custom paths. However, it still stores the initial config (
paisa.yaml
) inC:\Users\username\Documents\paisa
, which it cannot write to if the user has enabled ransomware protection in Windows Defender.I know that most users are not affected by it, but since ransomware protection is a security feature built into Windows, Paisa should ideally be a app that does not need any special write access to protected folders.
Paisa should try to store configuration files (like
paisa.yaml
) in theC:\Users\username\AppData\Local
or at least ProgramFiles on Windows, since this is where apps are expected to store data.To Reproduce Steps to reproduce the behavior:
Expected behavior Paisa should not be storing config files in folders which Windows considers as protected by default. It is also not possible to remove the
Documents
folder from ransomware protection, so disabling it or letting Paisa through is the only option.Screenshots![image](https://github.com/ananthakumaran/paisa/assets/61023404/463c769d-73cb-47f1-951a-cab12429382b)