From 6b9b4c91d122dccabf7541af70ed68a623ad8810 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 9 Apr 2015 11:12:47 -0400 Subject: Detect running under cygwin and fail gracefully --- scripts/check-viewer-xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'scripts') 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) -- cgit v1.2.3