lib/watch_tower/eye.rb in watch_tower-0.0.1.beta5 vs lib/watch_tower/eye.rb in watch_tower-0.0.1.beta6
- old
+ new
@@ -28,12 +28,14 @@
# Get the currently being edited file from the editor
files_paths = editor.current_paths
# Iterate over the files to fill the database
files_paths.each do |file_path|
begin
- next unless file_path && File.exists?(file_path)
next if file_path =~ IGNORED_PATHS
+ next unless file_path
+ next unless File.exists?(file_path)
+ next unless File.file?(file_path)
# Get the file_hash of the file
file_hash = Digest::SHA1.file(file_path).hexdigest
# Create a project from the file_path
project = Project.new_from_path(file_path)
rescue PathNotUnderCodePath
@@ -89,6 +91,6 @@
Signal.trap("TERM") { $close_eye = true }
start(options)
end
end
-end
\ No newline at end of file
+end