summaryrefslogtreecommitdiff
path: root/UConfig.pas
diff options
context:
space:
mode:
Diffstat (limited to 'UConfig.pas')
-rw-r--r--UConfig.pas20
1 files changed, 11 insertions, 9 deletions
diff --git a/UConfig.pas b/UConfig.pas
index e295e2d..4dd13aa 100644
--- a/UConfig.pas
+++ b/UConfig.pas
@@ -130,14 +130,14 @@ function CheckConfFilesMod(var ChangedMainGUI, ChangedAssoc, ChangedBookmarks, C
implementation
-uses Libc, SysUtils, IniFiles, UCoreUtils, UCore, UFileAssoc, UCoreClasses, UGnome, UVFSCore;
+uses ULibc, SysUtils, UCoreUtils, UCore, UFileAssoc, UCoreClasses, UGnome, UVFSCore;
var InternalQuickExit, InternalDeleteHistory: boolean;
InternalMainGUIConfmtime, InternalBookmarksConfmtime, InternalFAssocConfmtime, InternalMounterConfmtime,
InternalConnMgrConfmtime: Longint;
-function GetFileTime(FileName: string): Longint; forward;
+function GetFileTime(FileName: string): time_t; forward;
(********************************************************************************************************************************)
(********************************************************************************************************************************)
@@ -652,7 +652,7 @@ begin
Exit;
end;
s := IncludeTrailingPathDelimiter(s) + 'filetypes';
- if Libc.access(PChar(s), R_OK) = 0 then Libc.remove(PChar(s));
+ if access(PChar(s), R_OK) = 0 then libc_remove(PChar(s));
IniFile := TMyIniFile.Create(s, False);
try try
@@ -786,7 +786,7 @@ begin
Exit;
end;
s := IncludeTrailingPathDelimiter(s) + 'mounter';
- if Libc.access(PChar(s), R_OK) = 0 then Libc.remove(PChar(s));
+ if access(PChar(s), R_OK) = 0 then libc_remove(PChar(s));
IniFile := TMyIniFile.Create(s, False);
try try
@@ -959,7 +959,7 @@ begin
Exit;
end;
s := IncludeTrailingPathDelimiter(s) + 'connmgr';
- if Libc.access(PChar(s), R_OK) = 0 then Libc.remove(PChar(s));
+ if access(PChar(s), R_OK) = 0 then libc_remove(PChar(s));
IniFile := TMyIniFile.Create(s, False);
try try
@@ -1016,12 +1016,14 @@ end;
(********************************************************************************************************************************)
(********************************************************************************************************************************)
-function GetFileTime(FileName: string): Longint;
-var StatBuf : TStatBuf64;
+function GetFileTime(FileName: string): time_t;
+var StatBuf: Pstat64;
begin
Result := -1;
- if __lxstat64(_STAT_VER, PChar(FileName), StatBuf) <> 0 then Exit;
- Result := StatBuf.st_mtime;
+ StatBuf := malloc(sizeof(Tstat64));
+ memset(StatBuf, 0, sizeof(Tstat64));
+ if lstat64(PChar(FileName), StatBuf) = 0 then Result := StatBuf^.st_mtim.tv_sec;
+ libc_free(StatBuf);
end;
function CheckConfFilesMod(var ChangedMainGUI, ChangedAssoc, ChangedBookmarks, ChangedMounter, ChangedConnections: boolean): boolean;