~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/my_copy.cc

  • Committer: Olaf van der Spek
  • Date: 2011-10-10 09:27:50 UTC
  • mto: (2430.1.6 rf)
  • mto: This revision was merged to the branch mainline in revision 2436.
  • Revision ID: olafvdspek@gmail.com-20111010092750-ryxgmn7zj5yvxfkf
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
15
 
16
 
#include "config.h"
 
16
#include <config.h>
17
17
 
18
 
#include "drizzled/internal/my_sys.h"
 
18
#include <drizzled/internal/my_sys.h>
19
19
 
20
20
#include <fcntl.h>
21
21
 
22
 
#include "drizzled/internal/m_string.h"
 
22
#include <drizzled/internal/m_string.h>
23
23
#if defined(HAVE_UTIME_H)
24
24
#include <utime.h>
25
25
#elif defined(HAVE_SYS_UTIME_H)
106
106
    /* Copy modes if possible */
107
107
 
108
108
    if (MyFlags & MY_HOLD_ORIGINAL_MODES && !new_file_stat)
109
 
        return(0);                      /* File copyed but not stat */
 
109
        return 0;                       /* File copyed but not stat */
110
110
    chmod(to, stat_buff.st_mode & 07777); /* Copy modes */
111
111
    if(chown(to, stat_buff.st_uid,stat_buff.st_gid)!=0)
112
112
        return 0;
117
117
      timep.modtime = stat_buff.st_mtime;
118
118
      utime((char*) to, &timep); /* last accessed and modified times */
119
119
    }
120
 
    return(0);
 
120
    return 0;
121
121
  }
122
122
 
123
123
err: