Ignore:
Timestamp:
01/27/12 12:54:01 (2 years ago)
Author:
ales_erjavec
Branch:
default
Message:

Changed default_reports_dir to standard (My )Documents folder (fixes #1065)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/misc/environ.py

    r9587 r9593  
    149149        application_dir = os.environ["APPDATA"] 
    150150        output_dir = os.path.join(application_dir, version) 
    151         default_reports_dir = os.path.join(home, "My Documents", "Orange Reports") 
     151        default_reports_dir = os.path.join(home, "My Documents") 
    152152    elif sys.platform == "darwin": 
    153153        application_dir = os.path.join(home, "Library", "Application Support") 
    154154        output_dir = os.path.join(application_dir, version) 
    155         default_reports_dir = os.path.join(home, "Library", 
    156                                            "Application Support", 
    157                                            version, "Reports") 
     155        default_reports_dir = os.path.join(home, "Documents") 
    158156    else: 
    159157        application_dir = home 
    160158        output_dir = os.path.join(home, "." + version) 
    161         default_reports_dir = os.path.join(home, "orange-reports") 
     159         
     160        documents = os.path.join(home, "Documents") 
     161        # Need to make sure Documents folder actually exists 
     162        if os.path.exists(documents) and os.path.isdir(documents): 
     163            default_reports_dir = documents 
     164        else: 
     165            default_reports_dir = home 
    162166 
    163167    add_ons_dir_user = os.path.join(output_dir, "add-ons") 
Note: See TracChangeset for help on using the changeset viewer.