I am running Ruby 1.8.5 and windows XP. I am working on a program that
monitors a directory and updates and updates a database based on the
changes. At the moment I have some code to handle files that are added.
Basically I have 3 methods:

Pseudo code

def monitor
   event_handler(array)
end

event_handler(array)
    p array
    If file is added
        file_added(arr)
   end
end

file_added(array)
  #Insert into database
end

Here's my problem. Let's say I drag 10 files into the directory. If I
only have the event_handler print the array I get all 10. However, when
the event_handler calls the file_added method I only get 5 or 6 files
inserted in the database. The code is not throwing exceptions.

Any ideas on how I can fix this? I can post the code if needed.

thanks,

Luis