No such thing as a small change | |
PerlMonks |
Re: Filesys::SmbClientParser Get Files Randomly Fails with no Errorby Corion (Patriarch) |
on Nov 21, 2016 at 20:20 UTC ( [id://1176281]=note: print w/replies, xml ) | Need Help?? |
Have you tried reducing your code to the relevant 10 lines or so? Without seeing and knowing your complete program, it is hard for us to advise you in a good way because we can't tell what is old code, which code is actually run and what values the various variables have. Ideally, you can produce a short, self-contained script that uses the relevant module(s) and runs a short loop that at a certain time fails so we can easily reproduce the problem. Note that we will also need the output of that program and an exact description of what you think it does and why that is not what you want, and what exactly you want. While trying to read through your code as shown above, I noticed that it tries to call smb->get ("$file") twice. This seems weird. Maybe the lack of error checking on the first (or second) call is relevant? Also note that I'm quite unclear on what you mean by 'This code consistently spits out a "1"' - I don't see any print statement, or return statement, or anything else that would spit out a number. Maybe this is hidden somewhere in the logfile that you haven't shown us. One thing that might be problematic for you might be filesystem encodings between the remote/SMB filesystem and your local filesystem, and the mechanism by which the module parses the output. Usually, unixishes OSes blindly assume that all filenames are UTF-8 encoded octets. SMB filesystems might have a different encoding for the filenames, but will still return the raw octets to the caller.
In Section
Seekers of Perl Wisdom
|
|