diff options
author | Chris Schlaeger <chris@linux.com> | 2018-07-17 20:33:43 +0200 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2018-07-17 20:33:43 +0200 |
commit | 859f41226cef50003e8ced4345e042d1fe8a7652 (patch) | |
tree | 33e14593ced162fa70919e804d5d98746299bf3d /lib | |
parent | b2d2e9fc892984330a1bcd2574f755e3ba1f2265 (diff) | |
download | postrunner-859f41226cef50003e8ced4345e042d1fe8a7652.zip |
New: Also import files that end with '.fit' instead of '.FIT'.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/postrunner/Main.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/postrunner/Main.rb b/lib/postrunner/Main.rb index 2717e0e..353bb59 100644 --- a/lib/postrunner/Main.rb +++ b/lib/postrunner/Main.rb @@ -252,7 +252,7 @@ weekly [ <YYYY-MM-DD> ] week. If no date is given, yesterday's week will be used. -<fit file> An absolute or relative name of a .FIT file. +<fit file> An absolute or relative name of a .FIT or .fit file. <ref> The index or a range of indexes to activities in the database. :1 is the newest imported activity @@ -437,12 +437,12 @@ EOT def process_files(files_or_dirs, command) if files_or_dirs.empty? - Log.abort("You must provide at least one .FIT file name.") + Log.abort("You must provide at least one .FIT or .fit file name.") end files_or_dirs.each do |fod| if File.directory?(fod) - Dir.glob(File.join(fod, '*.FIT')).each do |file| + Dir.glob(File.join(fod, '*.FIT'), File::FNM_CASEFOLD).each do |file| process_file(file, command) end else |