[sork] Re: extension to the vacation routines

Eric Rostetter eric.rostetter@physics.utexas.edu
Tue, 23 Jul 2002 09:20:25 -0500


Quoting Dietmar Lembke <lembke@lcc.ch>:

> Hi eric,
> I did run into some problems when I tried to remove the vacation message
> when it was already remove -> the .forward no more exists.

This should have "worked" and just returned an "appropriate" error message
to the user. 

> the vacation script in function  ftp_delete_file did hang for about one 
> minute if the file did not exist.

This sounds to me like a bug in your ftp server or your php build.  It
shouldn't hang.

> in the patch below I first check if the file exists and if so I try to 
> remove it.

I'll consider your code for inclusion, as it is reasonable.  It would
add overhead, but it would also make the error messages more precise,
so it may be worth the overhead for better error reporting...

> Same problem in  ftp_copy_file were you try to remove the .forward befor
> putting the new .forward file on the server. I just commented it out 
> since overwrite works on our server.

I don't know it (overwrite) works on all servers.  I don't think I would
have wrote it that way if it did...  (But the memory is a bit fuzzy)

> maybe a little routine would catch both cases and just calling the 
> routine before trying to delete the file in both locations.

*nod*

> Hope you can use the stuff,

I'll check it out! :)
 
> best regards and thanks for the work!

Thanks for your submission!

> didi
-- 
Eric Rostetter
The Department of Physics
The University of Texas at Austin

"TAD (Technology Attachment Disorder) is an unshakable, impractical devotion
to a brand, platform, product line, or programming language. It's relatively
harmless among the rank and file, but when management is afflicted the damage
can be measured in dollars. It's also contagious -- someone with sufficient
political clout can infect an entire organization."

--"Enterprise Strategies" columnist Tom Yager.