v1cont / yad

Yet Another Dialog
GNU General Public License v3.0
654 stars 58 forks source link

[wiki] Frontend-for-find script - fix non portable date format #212

Open step- opened 1 year ago

step- commented 1 year ago

Attached patch file with proposed fix.

This fix depends on GNU date for its --date option.

Issue: the current code doesn't work for all date locales. You should be able to reproduce this issue by running LC_ALL=C ./Frontend-for-find.sh and changing the "Newer than" field by clicking the calendar icon.

Fix: normalized form date value format to %x (yad default and user's local date format), and converted it back to Y-m-d format using GNU date).

0001-fix-non-portable-date-format.patch.txt

P.S. Is there a way to submit PR for wiki pages?

step- commented 1 year ago

Found another issue. find -printf format is incompatible with xdg-open set by the second plug with --dclick-action=xdg-open '%s'.

File manager's error message: "File doesn't exist, or I can't access it: 14:37 root/root"

1355 bash -c 'run_find '\''*'\'' FALSE '\''/mnt/s/yad-master'\'' '\'''\'' '\'''\'''
1356 find /mnt/s/yad-master -name '*' -printf '%p\n%s\n%M\n%TD %TH:%TM\n%u/%g\n'
v1cont commented 1 year ago

fixed