summaryrefslogtreecommitdiffstats
path: root/client/engine/Registry.lib
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2018-01-22 11:20:51 +0000
committerramon <ramongomez@us.es>2018-01-22 11:20:51 +0000
commit58718f504ebf4c288fc1f8e505bf6e6c883db885 (patch)
treecc9d787c44fd0d2ef04bc93e3d4a7e4636d49bbf /client/engine/Registry.lib
parentf7f7a213caaec5ae4b20b3c036a01a6397bda1bf (diff)
Cerrar #823: Métodos más rápido para localizar ficheros y para obtener versión en Windows; cambiar {{{Mac OS...}}} por {{{macOS...}}} en función {{{ogGetOsVersion}}}.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5576 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/engine/Registry.lib')
-rwxr-xr-xclient/engine/Registry.lib15
1 files changed, 5 insertions, 10 deletions
diff --git a/client/engine/Registry.lib b/client/engine/Registry.lib
index 78a725de..dbe69aee 100755
--- a/client/engine/Registry.lib
+++ b/client/engine/Registry.lib
@@ -234,16 +234,11 @@ fi
[ $# == 2 ] || ogRaiseError $OG_ERR_FORMAT || return $?
# Camino del fichero de registro de usuario o de sistema (de menor a mayor prioridad).
-for FILE in $(ogGetPath "/$1/Documents and Settings/$2/NTUSER.DAT") \
- $(ogGetPath "/$1/Users/$2/NTUSER.DAT") \
- $(ogGetPath "/$1/winnt/system32/config/$2") \
- $(ogGetPath "/$1/windows/system32/config/$2"); do
- [ -f "$FILE" ] && HIVE="$FILE"
-done
-# Error si no se encuentra el fichero de registro.
-[ -f "$HIVE" ] || ogRaiseError $OG_ERR_NOTFOUND "$1 $2" || return $?
-
-echo "$HIVE"
+FILE="$(ogGetPath "/$1/Windows/System32/config/$2")"
+[ -z "$FILE" ] && FILE="$(ogGetPath "/$1/Users/$2/NTUSER.DAT")"
+[ -z "$FILE" ] && FILE="$(ogGetPath "/$1/winnt/system32/config/$2")"
+[ -z "$FILE" ] && FILE="$(ogGetPath "/$1/Documents and Settings/$2/NTUSER.DAT")"
+[ -f "$FILE" ] && echo "$FILE" || ogRaiseError $OG_ERR_NOTFOUND "$1 $2" || return $?
}