Обсуждение: Use of copydir vs. cp

Поиск
Список
Период
Сортировка

Use of copydir vs. cp

От
Bruce Momjian
Дата:
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,
Pennsylvania19073
 


Re: Use of copydir vs. cp

От
Bruce Momjian
Дата:
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,
Pennsylvania19073
 


Re: Use of copydir vs. cp

От
Alvaro Herrera
Дата:
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


Re: Use of copydir vs. cp

От
Bruce Momjian
Дата:
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,
Pennsylvania19073