summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 0ad14ad3ae..1a893c52ce 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -358,6 +358,21 @@ BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf)
}
/*******************************************************************
+ rename a unix file
+********************************************************************/
+int file_rename(char *from, char *to)
+{
+ int rcode = rename (from, to);
+
+ if (errno == EXDEV)
+ {
+ /* Rename across filesystems needed. */
+ rcode = copy_reg (from, to);
+ }
+ return rcode;
+}
+
+/*******************************************************************
check a files mod time
********************************************************************/
time_t file_modtime(char *fname)