Missing paths when using File-Import-Files and Folders

From SuperMemopedia
Jump to navigation Jump to search

summary

When asking for the use of the default path in File : Import : Files and Folders, SuperMemo should check if the path points to a drive that is still available.

problem

Issue encountered using SuperMemo v16.1 and Windows 7.

  • When you use File--Import--Files and Folders, SuperMemo saves the path of the directory you last imported from.
  • The next time you use File--Import--Files and Folders, SuperMemo looks for that saved path and tries to load it in the file browser.
  • If the path you last imported from was in a volume (e.g. F:) that is no longer attached to your computer,
    • for example, you last imported files from a flash drive (e.g. F:\path\to\) then disconnected the flash drive from your computer,
  • SuperMemo displays the prompt:
    • "Path does not exist. Create?" asking to create a directory in the now non-existent volume (e.g. F:\path\to\).
  • Selecting "No" at the prompt results in an endless loop of the same prompt being displayed.
  • SuperMemo will not allow you to browse for an import directory until you select "Yes" to the "Path does not exist. Create?" prompt.
    • Selecting "Yes" at the prompt to create the path on the non-existent volume does not seem to cause any problems with Windows explorer.

investigation

This looks like a dumb bug, however, the following steps seem to have been passed ok:

  1. Import files and folders from drive J: (a flashdrive)
  2. remove the drive
  3. Import files and folders
  4. Message Path does not exist (a more appropriate message would be Drive does not exist)
  5. Esc result in aborting the import
  6. Yes to Create path? results in opening a selection of drives and folders to choose (without further errors or warnings)

In other words, no loop could be reproduced. There could be minor differences in code between various versions of SuperMemo 16. There is also a remote chance of slight differences between different versions of Windows. This needs to be investigated further.

conclusion

The problem does not need to be reproduced or investigated. The mere question about creating a folder is misguided as SuperMemo should first check if the drive exists. In other words, loop or no loop, the program needs to improve here.