Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1ccc170b
Commit
1ccc170b
authored
Dec 22, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Use Win32 functions instead of Unix ones to retrieve the current time.
parent
20ed414d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
trash.c
dlls/shell32/trash.c
+5
-11
No files found.
dlls/shell32/trash.c
View file @
1ccc170b
...
...
@@ -171,8 +171,7 @@ BOOL TRASH_CanTrashFile(LPCWSTR wszPath)
static
BOOL
try_create_trashinfo_file
(
const
char
*
info_dir
,
const
char
*
file_name
,
const
char
*
original_file_name
)
{
struct
tm
curr_time
;
time_t
curr_time_secs
;
SYSTEMTIME
curr_time
;
char
datebuf
[
200
];
char
*
path
=
SHAlloc
(
strlen
(
info_dir
)
+
strlen
(
file_name
)
+
strlen
(
trashinfo_suffix
)
+
1
);
int
writer
=
-
1
;
...
...
@@ -186,16 +185,11 @@ static BOOL try_create_trashinfo_file(const char *info_dir, const char *file_nam
write
(
writer
,
trashinfo_header
,
strlen
(
trashinfo_header
));
if
(
!
XDG_WriteDesktopStringEntry
(
writer
,
"Path"
,
XDG_URLENCODE
,
original_file_name
))
goto
error
;
time
(
&
curr_time_secs
);
localtime_r
(
&
curr_time_secs
,
&
curr_time
);
GetLocalTime
(
&
curr_time
);
wnsprintfA
(
datebuf
,
200
,
"%04d-%02d-%02dT%02d:%02d:%02d"
,
curr_time
.
tm_year
+
1900
,
curr_time
.
tm_mon
+
1
,
curr_time
.
tm_mday
,
curr_time
.
tm_hour
,
curr_time
.
tm_min
,
curr_time
.
tm_sec
);
curr_time
.
wYear
,
curr_time
.
wMonth
,
curr_time
.
wDay
,
curr_time
.
wHour
,
curr_time
.
wMinute
,
curr_time
.
wSecond
);
if
(
!
XDG_WriteDesktopStringEntry
(
writer
,
"DeletionDate"
,
0
,
datebuf
))
goto
error
;
close
(
writer
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment