~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_redel.c

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
#include "mysys_priv.h"
 
17
#include <my_dir.h>
17
18
#include <mystrings/m_string.h>
18
19
#include "mysys_err.h"
19
20
#if defined(HAVE_UTIME_H)
46
47
    goto end;
47
48
  if (MyFlags & MY_REDEL_MAKE_BACKUP)
48
49
  {
49
 
    char name_buff[FN_REFLEN+20];
 
50
    char name_buff[FN_REFLEN+20];    
50
51
    char ext[20];
51
52
    ext[0]='-';
52
53
    get_date(ext+1,2+4,(time_t) 0);
53
 
    strcpy(strchr(ext, '\0'),REDEL_EXT);
 
54
    my_stpcpy(strchr(ext, '\0'),REDEL_EXT);
54
55
    if (my_rename(org_name, fn_format(name_buff, org_name, "", ext, 2),
55
56
                  MyFlags))
56
57
      goto end;
89
90
    if (MyFlags & MY_LINK_WARNING)
90
91
      my_error(EE_LINK_WARNING,MYF(ME_BELL+ME_WAITTANG),from,statbuf.st_nlink);
91
92
  }
92
 
  if(chown(to, statbuf.st_uid, statbuf.st_gid)!=0)
93
 
    return 1;
 
93
  chown(to, statbuf.st_uid, statbuf.st_gid);    /* Copy ownership */
94
94
 
95
95
#ifndef __ZTC__
96
96
  if (MyFlags & MY_COPYTIME)