From 82a3318b0c3b3451c80f94957578e6821df2fd36 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 12 Apr 2011 17:57:57 +0000 Subject: [PATCH] =?UTF-8?q?Tarea=20#569=20->=20Revisar=20la=20aplicaci?= =?UTF-8?q?=C3=B3n=20para=20que=20no=20de=20problemas=20con=20Windows=207?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@548 f4e31baf-9722-1c47-927c-6f952f962d4b --- Source/Base/uDMBase.pas | 22 ++++++++++++++++------ Source/GUIBase/uViewGridBase.pas | 4 ++-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Source/Base/uDMBase.pas b/Source/Base/uDMBase.pas index 07664bd5..fbe1ea27 100644 --- a/Source/Base/uDMBase.pas +++ b/Source/Base/uDMBase.pas @@ -43,7 +43,8 @@ implementation uses uDataModuleConexion, Dialogs, TBX, TBXThemes, Forms, Windows, - JclFileUtils, cxControls, SysUtils, uDataModuleConfiguracion; + JclFileUtils, cxControls, SysUtils, uDataModuleConfiguracion, + uSistemaFunc, SHFolder; { *********************************** TdmBase ************************************ @@ -59,14 +60,23 @@ begin end; procedure TdmBase.IniciarLog; +var + ALogFileName : String; begin FEscribirLog := TCriticalSection.Create; - JvLogFile.Active := False; - JvLogFile.FileName := ExtractFilePath(Application.ExeName) + 'ClientLog.txt'; - JvLogFile.AutoSave := True; - JvLogFile.Active := True; - JvLogFile.Clear; + ALogFileName := GetSpecialFolderPath(CSIDL_APPDATA); //[Current Users]\Application Data + ALogFileName := ALogFileName + PathDelim + 'Rodax Software' + PathDelim + 'FactuGES' + PathDelim; + if SysUtils.ForceDirectories(ALogFileName) then + begin + JvLogFile.Active := False; + JvLogFile.FileName := ALogFileName + 'ClientLog.txt'; + JvLogFile.AutoSave := True; + JvLogFile.Active := True; + JvLogFile.Clear; + end + else + raise Exception.Create('Error al crear directorio para Log: ' + IntToStr(GetLastError)); end; procedure TdmBase.InitStyleManager(ThemeID : integer = 0); diff --git a/Source/GUIBase/uViewGridBase.pas b/Source/GUIBase/uViewGridBase.pas index 6ae077e8..fb51587a 100644 --- a/Source/GUIBase/uViewGridBase.pas +++ b/Source/GUIBase/uViewGridBase.pas @@ -343,7 +343,7 @@ begin if Assigned(_FocusedView) then begin - AIniFile := GetSpecialFolderPath(CSIDL_COMMON_APPDATA); //[All Users]\Application Data + AIniFile := GetSpecialFolderPath(CSIDL_APPDATA); //[Current Users]\Application Data AIniFile := AIniFile + PathDelim + 'Rodax Software' + PathDelim + GetAppName + PathDelim; if not DirectoryExists(AIniFile) then @@ -441,7 +441,7 @@ begin if Assigned(_FocusedView) then begin - AIniFile := GetSpecialFolderPath(CSIDL_COMMON_APPDATA); //[All Users]\Application Data + AIniFile := GetSpecialFolderPath(CSIDL_APPDATA); //[Current Users]\Application Data AIniFile := AIniFile + PathDelim + 'Rodax Software' + PathDelim + GetAppName + PathDelim; if not DirectoryExists(AIniFile) then