diff --git a/src/google-drive.rb b/src/google-drive.rb index 986ba66..f0b8e73 100755 --- a/src/google-drive.rb +++ b/src/google-drive.rb @@ -50,6 +50,7 @@ 'application/vnd.google-apps.spreadsheet' => { :path => 'icons/sheet.png' }, 'application/vnd.google-apps.presentation' => { :path => 'icons/slide.png' }, 'application/vnd.google-apps.form' => { :path => 'icons/form.png' }, + 'application/vnd.google-apps.folder' => { :path => 'icons/folder.png' }, 'application/pdf' => { :path => 'icons/dummy.pdf', :type => 'fileicon' }, } @@ -524,8 +525,9 @@ def self.latest(include_prereleases = false) folders = items.select { |item| item['mimeType'] == 'application/vnd.google-apps.folder' } folders.each { |item| parents_by_id[item['id']] = item } - files = items.reject { |item| item['mimeType'] == 'application/vnd.google-apps.folder' } - files = files.select { |item| item['title'] =~ filter_regex } + # We want to return folders too, so dont reject them + # files = items.reject { |item| item['mimeType'] == 'application/vnd.google-apps.folder' } + files = items.select { |item| item['title'] =~ filter_regex } files = files.sort { |lhs, rhs| rhs['modifiedDate'] <=> lhs['modifiedDate'] } res += files.map do |item| diff --git a/src/icons/folder.png b/src/icons/folder.png new file mode 100644 index 0000000..9909c41 Binary files /dev/null and b/src/icons/folder.png differ