๐Ÿ“ฆโž”๐Ÿฆ‹ Store and retrieve files on the Atmosphere
35
fork

Configure Feed

Select the types of activity you want to include in your feed.

[#5] replace wc with stat for filesize calcs

Ducky 4ce18f2b 7c3d928f

+3 -1
+3 -1
atfile.sh
··· 1811 1811 1812 1812 if [[ $success == 1 ]]; then 1813 1813 unset file_date 1814 + unset file_size 1814 1815 1815 1816 if [[ $(atfile.util.get_os) == "macos" ]]; then 1816 1817 file_date="$(atfile.util.get_date "$(stat -f '%Sm' -t "%Y-%m-%dT%H:%M:%SZ" "$file")")" 1818 + file_size="$(stat -f '%z' "$file")" 1817 1819 else 1818 1820 file_date="$(atfile.util.get_date "$(stat -c '%y' "$file")")" 1821 + file_size="$(stat -c %s "$file")" 1819 1822 fi 1820 1823 1821 1824 file_hash="$(atfile.util.get_md5 "$file")" 1822 1825 file_hash_type="md5" 1823 1826 file_name="$(basename "$file")" 1824 - file_size="$(wc -c "$file" | cut -d " " -f 1)" 1825 1827 file_type="$(file -b --mime-type "$file")" 1826 1828 1827 1829 if [[ -z "$file_hash" ]]; then