Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when visiting a subfolder without files #10

Open
AlonTzarafi opened this issue Aug 22, 2021 · 1 comment
Open

Error when visiting a subfolder without files #10

AlonTzarafi opened this issue Aug 22, 2021 · 1 comment

Comments

@AlonTzarafi
Copy link

AlonTzarafi commented Aug 22, 2021

When visiting a subfolder without files, there is an error thrown by line 223 of the code:
(minspc (1+ (apply #'max (dgi--get-dired-files-length files))))

The backtrace:

Debugger entered--Lisp error: (wrong-number-of-arguments #<subr max> 0)
  max()
  apply(max nil)
  (1+ (apply #'max (dgi--get-dired-files-length files)))
tuh8888 added a commit to tuh8888/dired-git-info that referenced this issue Jan 20, 2023
@lina-bh
Copy link

lina-bh commented Nov 5, 2024

If anyone wants to hotfix this with an advice:

(define-advice dgi--get-dired-files-length
        (:around (fun &rest args))
      (or (apply fun args)
          '(0)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants