Use of copydir vs. cp

Started by Bruce Momjianover 20 years ago4 messages
#1Bruce Momjian
pgman@candle.pha.pa.us

Right now, we use 'cp' in unix, and a copydir() function on Win32.
Shouldn't we be using copydir() on all platforms so we can report errors
more easily?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#2Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Bruce Momjian (#1)
Re: Use of copydir vs. cp

Bruce Momjian wrote:

Right now, we use 'cp' in unix, and a copydir() function on Win32.
Shouldn't we be using copydir() on all platforms so we can report errors
more easily?

Oops, I see Win32 CopyFile() in copydir.c. Seems copydir() would need
some modifications to work on Unix. I added it to the TODO list.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Alvaro Herrera
alvherre@surnet.cl
In reply to: Bruce Momjian (#1)
Re: Use of copydir vs. cp

On Mon, Jul 04, 2005 at 12:45:47PM -0400, Bruce Momjian wrote:

Right now, we use 'cp' in unix, and a copydir() function on Win32.
Shouldn't we be using copydir() on all platforms so we can report errors
more easily?

I agree. In fact, I didn't understand it back then when you opposed the
idea of doing that.

--
Alvaro Herrera (<alvherre[a]surnet.cl>)
Jude: I wish humans laid eggs
Ringlord: Why would you want humans to lay eggs?
Jude: So I can eat them

#4Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Alvaro Herrera (#3)
Re: Use of copydir vs. cp

Alvaro Herrera wrote:

On Mon, Jul 04, 2005 at 12:45:47PM -0400, Bruce Momjian wrote:

Right now, we use 'cp' in unix, and a copydir() function on Win32.
Shouldn't we be using copydir() on all platforms so we can report errors
more easily?

I agree. In fact, I didn't understand it back then when you opposed the
idea of doing that.

At the time, we were trying to get Win32 in with as little code change
as possible. At this point, with everything working, it is time to
complete this item.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073