Unwanted file moving/deleting behavior

jaystarkey's Avatar


06 May, 2020 01:03 AM

I mostly use anki on the web or my iphone these days, but (relatively) recently migrated to a new windows computer. I keep "my documents" on its own drive (not the C drive) which is backed up both locally and to the cloud, which is where Anki has always lived. I had need to use Anki for the first time in a while today on the desktop, so I installed Anki. Long story short, as I was searching (and found) how to have anki data live in a non-standard location via changing the shortcut values, my Anki folder completely disappeared from my documents. I realized this was just copied to the users folder where Anki now houses data by default, but this was all done in the background without any confirmation by me. This will require time to put the files back and causes problems with my local and cloud backups.

I think that moving (not just copying, but also deleting!) files from someone's drive without user intervention/permission is risky. I would suggest a confirmation dialog asking if this behavior is desired, as well as an option to automatically make a new shortcut and point to the data permanently instead as well.

I realize that this won't affect a lot of users, but even so, I think this behavior needs some attention.

To be fair, I had installed a previous version of Anki that I had already downloaded but then had problems connecting to the cloud for sync so downloaded the current version (Version 2.1.25), and I am unsure at what point in my install/upgrade path this behavior occurred, so my apologies if this issue has already been addressed.

  1. 1 Posted by addons_zz on 06 May, 2020 02:30 AM

    addons_zz's Avatar

    I had the same problem. I also keep my documents in another partition and anki just moved everything out (from one disk to another) without any confirmation or warning. It should ask whether I would like to do it or not and I definitely would not do it.

    I know anki did this because One Drive was causing the anki collection to be corrupted, but I do not use one drive (for a good reason like this one, corrupting things). I only figured out I could fix it by passing the command line argument Running from a Flash Drive g:\anki\anki.exe -b g:\ankidata or by defining the environment variable ANKI_BASE.

    Related to: How to generate Anki build packages for Linux/Mac OS/Windows?

  2. Support Staff 2 Posted by Damien Elmes on 06 May, 2020 08:37 AM

    Damien Elmes's Avatar

    The move from my documents was documented in the upgrade notes - it's been quite a few years since this change was made. I'm a bit concerned that a popup will just cause confusion for the typical upgrading user, but if one of you sends through a PR that asks the user to confirm and quits Anki if they say no, I'll merge it.

  3. 3 Posted by addons_zz on 07 May, 2020 04:27 PM

    addons_zz's Avatar

    I opened a pull request on: https://github.com/ankitects/anki/pull/610 - Ask user confirmation before moving the Anki directory

Comments are closed, but you can start a new discussion.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac