- Timestamp:
- May 1, 2010, 4:40:53 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.9x/libtransmission/bencode.c
r10530 r10584 12 12 13 13 #include <assert.h> 14 #include <ctype.h> /* isdigit */14 #include <ctype.h> /* isdigit() */ 15 15 #include <errno.h> 16 #include <math.h> /* fabs */ 16 #include <limits.h> /* PATH_MAX */ 17 #include <math.h> /* fabs() */ 17 18 #include <stdio.h> 18 #include <stdlib.h> 19 #include <stdlib.h> /* realpath() */ 19 20 #include <string.h> 20 21 … … 24 25 #include <unistd.h> /* stat(), close() */ 25 26 26 #include <event.h> /* evbuffer */27 #include <event.h> /* struct evbuffer */ 27 28 28 29 #include "ConvertUTF.h" … … 1621 1622 int fd; 1622 1623 int err = 0; 1624 char buf[PATH_MAX]; 1625 1626 /* follow symlinks to find the "real" file, to make sure the temporary 1627 * we build with mkstemp() is created on the right partition */ 1628 if( realpath( filename, buf ) != NULL ) 1629 filename = buf; 1623 1630 1624 1631 /* if the file already exists, try to move it out of the way & keep it as a backup */
Note: See TracChangeset
for help on using the changeset viewer.