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