summaryrefslogtreecommitdiff
path: root/src/install.c
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-02-17 07:58:39 -0700
committerEric Blake <ebb9@byu.net>2009-02-17 07:58:39 -0700
commit65ba955988d1a1a93b4b1f70f84a8d6277312e78 (patch)
tree613963e515e4c6d833df39e29ee6a065981d63f5 /src/install.c
parentdac5f12c6ed1225bfb8043d9ff7227d29439a955 (diff)
downloadcoreutils-65ba955988d1a1a93b4b1f70f84a8d6277312e78.tar.xz
install: compare files in binary mode
* src/install.c (need_copy): Use O_BINARY when it matters.
Diffstat (limited to 'src/install.c')
-rw-r--r--src/install.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/install.c b/src/install.c
index 669fbea7a..2aa27d0af 100644
--- a/src/install.c
+++ b/src/install.c
@@ -1,5 +1,5 @@
/* install - copy files and set attributes
- Copyright (C) 89, 90, 91, 1995-2008 Free Software Foundation, Inc.
+ Copyright (C) 89, 90, 91, 1995-2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -255,11 +255,11 @@ need_copy (const char *src_name, const char *dest_name,
}
/* compare files content */
- src_fd = open (src_name, O_RDONLY);
+ src_fd = open (src_name, O_RDONLY | O_BINARY);
if (src_fd < 0)
return true;
- dest_fd = open (dest_name, O_RDONLY);
+ dest_fd = open (dest_name, O_RDONLY | O_BINARY);
if (dest_fd < 0)
{
close (src_fd);