Page 1 of 1

uploaded FTP event contains duplicate directories

Posted: Wed May 04, 2005 2:51 pm
by zmuser
I'm using LiveCd 1.21.0, and to get the FTP upload filter to work I had to install the Perl Zip/Tar packages. When I try to use the FTP function, however, the resulting .zip or .tar file contains 2 directories per camera.

I am no Linux expert, but I think it's because each camera has both a directory AND a soft link:

Code: Select all

drwxr-xr-x    3 apache apache 4096 May  3 21:24 .
drwxr-xr-x    7 apache apache 4096 May  3 18:18 ..
drwxr-xr-x  215 apache apache 4096 May  4 10:32 1
lrwxrwxrwx    1 apache apache    1 May  3 18:18 Cam_1 -> 1
The resulting .zip or .tar file is twice as large as it should be, as it contains two directories with identical files:

Code: Select all

# tar -tf Event-221.tar
1/221/001-capture.jpg
1/221/002-capture.jpg
1/221/003-capture.jpg
1/221/004-capture.jpg...
Cam_1/221/001-capture.jpg
Cam_1/221/002-capture.jpg
Cam_1/221/003-capture.jpg
Cam_1/221/004-capture.jpg...
I'm sure it's an easy fix, and someone must have encountered it before... unless I am doing something wrong? Is there a configuration problem with my Perl Zip/Tar package?

How can I correct this problem?

Thanks!

Posted: Thu May 05, 2005 4:55 pm
by zoneminder
I will look into this. Your analysis makes sense so I'm surprised no-one else has reported this. I suspect the fix is as simple as ensuring that the file tree walk doesn't follow symlinks.

It's on the bug DB now anyway.

Phil