summaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-10-24 18:37:09 +0000
committerNick Mathewson <nickm@torproject.org>2005-10-24 18:37:09 +0000
commita20835ac920b446e808116dad8ba6cf9c7d18a7e (patch)
tree10d3e916da8377298aa1244568af8e3ce9b1b6de /src/common/util.c
parente2c6d6ce201f228fc3f0c48cdbb06c9934369c81 (diff)
downloadtor-a20835ac920b446e808116dad8ba6cf9c7d18a7e.tar.gz
tor-a20835ac920b446e808116dad8ba6cf9c7d18a7e.zip
Check for even more windows version flags, and note any we do not recognize.
svn:r5297
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 5d08cd6ded..09fdd98416 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -909,7 +909,7 @@ check_private_dir(const char *dirname, cpd_check_t check)
if (st.st_mode & 0077) {
log(LOG_WARN, LD_FS, "Fixing permissions on directory %s", dirname);
if (chmod(dirname, 0700)) {
- log(LOG_WARN, LD_GENERAL, "Could not chmod directory %s: %s", dirname,
+ log(LOG_WARN, LD_FS, "Could not chmod directory %s: %s", dirname,
strerror(errno));
return -1;
} else {
@@ -930,8 +930,8 @@ write_str_to_file(const char *fname, const char *str, int bin)
{
#ifdef MS_WINDOWS
if (!bin && strchr(str, '\r')) {
- warn(LD_GENERAL,
- "How odd. Writing a string that does contain CR already.");
+ warn(LD_BUG,
+ "Bug: we're writing a text string that already contains a CR.");
}
#endif
return write_bytes_to_file(fname, str, strlen(str), bin);
@@ -1243,6 +1243,9 @@ tor_listdir(const char *dirname)
}
result = smartlist_create();
while (1) {
+ if (!strcmp(findData.cFileName, ".") ||
+ !strcmp(findData.cFileName, ".."))
+ continue;
smartlist_add(result, tor_strdup(findData.cFileName));
if (!FindNextFile(handle, &findData)) {
if (GetLastError() != ERROR_NO_MORE_FILES) {