Has anyone had any experience using file::find on an smbmount'd drive? Here's the situation. I mount a drive in my home directory called "mp3s", so the path resolves to /home/slycer/mp3s, this is mounted on a share on my 2000 machine. Access to these files normally works (ie: "ls" returns a file listing). When I try to use file::find, it only returns a directory listing (ie, only the first level of dirs). So, thinking I had the format wrong I copied a bunch of mp3s to an actual directory (/home/slycer/test), threw them into a subdirectoy of that one (eg: /home/slycer/test/u2) and changed the code to point at the toplevel for that dir (/home/slycer/test). This built a list properly. So, I am stumped. I am hesitant to assume a bug in File::Find, but cannot find anything that states that it will not properly search smb mounted drives. I'm curious whether anyone has experienced the same behavior. This is the code, pretty basic:
use File::Find;
my @mp3s;
my $startdir="/home/slycer/mp3s" #/home/slycer/test
find sub {push (@mp3s, $File::Find::Name) if /\.mp3/},$startdir;
Like I said, this works wonderfully if the directory is an actual non-smb mounted directory.
Thanks
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.