Changeset 768


Ignore:
Timestamp:
01/28/14 17:12:05 (10 years ago)
Author:
bln4
Message:

When detecting OS by using indexOf on System.getProperty("os.name").toLowerCase() the code was checking if (for example) "win" was at a index greater than zero. This meant the comparison failed when it shouldn't have. We now check if "win" was at index greater than or equal to zero.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/settings/UserSettings.java

    r761 r768  
    496496        public static String getSaveLocation() {
    497497                String OS=System.getProperty("os.name").toLowerCase();
    498                 if(OS.indexOf("win")>0) {                       //windoze
     498                if(OS.indexOf("win")>=0) {                      //windoze
    499499                        return System.getenv("APPDATA")+File.separator+".expeditee"+File.separator;
    500                 } else if(OS.indexOf("mac")>0) {        //mac
     500                } else if(OS.indexOf("mac")>=0) {       //mac
    501501                        return System.getProperty("user.home")+File.separator+"Library"+File.separator+"Application Support"+File.separator+".expeditee"+File.separator;
    502502                } else {                                                        //linux or other
Note: See TracChangeset for help on using the changeset viewer.