소스 검색

Fix: find & case-insensitive filesystem

On case-insensitive filesystem,
`inbox` and `Inbox` are the same path.
Running `find Inbox inbox [expr]` will print twice the same information.

Use shell glob instead:
`find` will descend into path `inbox`,
ignoring letter cases, only once.

Fix #828.
pull/852/head
f380cedric 1 년 전
부모
커밋
3a2f4a55fa
1개의 변경된 파일2개의 추가작업 그리고 6개의 파일을 삭제
  1. +2
    -6
      bin/mailsync

+ 2
- 6
bin/mailsync 파일 보기

@@ -56,12 +56,8 @@ syncandnotify() {
acc="$(echo "$account" | sed "s/.*\///")"
if [ -z "$opts" ]; then mbsync "$acc"; else mbsync "$opts" "$acc"; fi
new=$(find\
"$HOME/.local/share/mail/$acc/INBOX/new/"\
"$HOME/.local/share/mail/$acc/Inbox/new/"\
"$HOME/.local/share/mail/$acc/inbox/new/"\
"$HOME/.local/share/mail/$acc/INBOX/cur/"\
"$HOME/.local/share/mail/$acc/Inbox/cur/"\
"$HOME/.local/share/mail/$acc/inbox/cur/"\
"$HOME/.local/share/mail/$acc/"[Ii][Nn][Bb][Oo][Xx]/new/\
"$HOME/.local/share/mail/$acc/"[Ii][Nn][Bb][Oo][Xx]/cur/\
-type f -newer "$lastrun" 2> /dev/null)
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
case 1 in


불러오는 중...
취소
저장