uploaded FTP event contains duplicate directories

Support and queries relating to all previous versions of ZoneMinder
Locked
zmuser
Posts: 2
Joined: Tue May 03, 2005 10:32 pm

uploaded FTP event contains duplicate directories

Post 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!
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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
Locked