Ticket #76 (closed defect: fixed)

Opened 3 years ago

Last modified 5 months ago

~/Documents isn't the documents directory

Reported by: njm Assigned to:
Priority: high Keywords:
Cc:

Description

reinteract/lib/reinteract/global_settings.py:

        # In a shocking example of cross-platform convergence, ~/Documents
        # is the documents directory on OS X, Windows, and Linux
        self.notebooks_dir = os.path.expanduser("~/Documents/Reinteract")

This is completely wrong -- on Windows, this path is obtained by calling SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, 0, buffer), on Linux it's stored in ~/.config/user-dirs.dirs and apparently doesn't have an API to access it, and I imagine there's something similar on OS X.

The end result is that you're creating folders and files in the wrong place and annoying your users.

Change History

03/29/09 17:37:25 changed by olethanh

On Linux your are supposed to use the xdg module

09/17/11 16:01:20 changed by otaylor

  • status changed from new to closed.
  • resolution set to fixed.

commit 2870aa3aa2999955a4420aefb2f360731880762d Author: Joerg Bornschein <joerg@das-labor.org> Date: Sun Mar 28 00:19:02 2010 +0100

Handle localized directory name

Changes things to use glib.get_user_special_dir(glib.USER_DIRECTORY_DOCUMENTS)