diff options
author | Oz Linden <oz@lindenlab.com> | 2015-04-09 11:12:47 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2015-04-09 11:12:47 -0400 |
commit | 6b9b4c91d122dccabf7541af70ed68a623ad8810 (patch) | |
tree | 1a8aafab7b0df5cbd7a8f296aa9277939503c88f | |
parent | 1abc87139b09d4d333c72eb5ffb576895f1c2a0f (diff) |
Detect running under cygwin and fail gracefully
-rwxr-xr-x | scripts/check-viewer-xml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/check-viewer-xml b/scripts/check-viewer-xml index 27c1112492..85366c02ae 100755 --- a/scripts/check-viewer-xml +++ b/scripts/check-viewer-xml @@ -68,11 +68,13 @@ elif sys.platform == 'linux2': CheckDirs = [ os.path.expanduser('~/.secondlife'), ] elif sys.platform == 'win32' or sys.platform == 'cygwin': - CheckDirs = [ os.path.expanduser('~\\Local Settings\\Temp'), - os.path.expanduser('~\\Application\\Data\\Secondlife'), - os.path.expanduser('~\\AppData\\Roaming\\Secondlife'), - os.path.expanduser('~\\AppData\\Local\\Secondlife'), - ] + if os.path.isdir(os.path.expanduser('~\\AppData\\Roaming')): + CheckDirs = [ os.path.expanduser('~\\Application\\Data\\Secondlife'), + os.path.expanduser('~\\AppData\\Roaming\\Secondlife'), + os.path.expanduser('~\\AppData\\Local\\Secondlife'), + ] + else: + sys.exit("No AppData\\Roaming directory found;\nThis script must be run in a native Windows command shell.\nRunning under cygwin does not work.") else: sys.exit("unrecognized platform '%s'" % sys.platform) |