discourse/app/controllers/admin
Blake Erickson b73a133bb5 FIX: Prevent scientific notation in free space check (#8473)
It's possibly that when trying to upload a backup the free space check
will output scientific notation resulting in an incorrect "There is not
enough space on disk" error.

The free space check uses the Linux `print` command which could return a
number using scientific notation like `1.60459e+10` and when ruby
converts it to an integer it will have the value of `1` instead of
`16045879296`. Which means even though you have 16GB of free space you
could not upload a 1GB backup file.

This commit uses the `printf` command instead which allows you to
specify that you do not want scientific notation.

I'm not sure why this hasn't been an issue before, but I was
experiencing it locally in development.
2019-12-11 12:57:03 +11:00
..
admin_controller.rb DEV: add a few frozen string literals 2019-05-02 16:57:12 +10:00
api_controller.rb FEATURE: Overhaul of admin API key system (#8284) 2019-11-05 14:10:23 +00:00
backups_controller.rb FIX: Prevent scientific notation in free space check (#8473) 2019-12-11 12:57:03 +11:00
badges_controller.rb FIX: Badge and user title interaction fixes (#8282) 2019-11-08 15:34:24 +10:00
color_schemes_controller.rb DEV: add a few frozen string literals 2019-05-02 16:57:12 +10:00
dashboard_controller.rb DEV: add a few frozen string literals 2019-05-02 16:57:12 +10:00
email_controller.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
email_styles_controller.rb FEATURE: customization of html emails (#7934) 2019-07-30 15:05:08 -04:00
email_templates_controller.rb FEATURE: Add welcome message for admins. (#8293) 2019-11-05 18:15:55 +05:30
embeddable_hosts_controller.rb DEV: add a few frozen string literals 2019-05-02 16:57:12 +10:00
embedding_controller.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
emojis_controller.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
groups_controller.rb FEATURE: Publish read state on group messages. (Originally introduced in #7989) (#8025) 2019-08-27 09:09:00 -03:00
impersonate_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
permalinks_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
plugins_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
reports_controller.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
robots_txt_controller.rb FEATURE: Allow customization of robots.txt (#7884) 2019-07-15 20:47:44 +03:00
screened_emails_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
screened_ip_addresses_controller.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
screened_urls_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
search_logs_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
site_settings_controller.rb REFACTOR: reduce the number of db queries. 2019-11-18 12:06:13 +05:30
site_texts_controller.rb FEATURE: Make site texts controller handle pages and locales (#8408) 2019-11-30 15:16:36 +02:00
staff_action_logs_controller.rb FIX: Don't error when the empty current value in dif (#8406) 2019-11-26 09:17:14 +11:00
themes_controller.rb FEATURE: Ability to add components to all themes (#8404) 2019-11-28 16:19:01 +11:00
user_fields_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
users_controller.rb FEATURE: Overhaul of admin API key system (#8284) 2019-11-05 14:10:23 +00:00
versions_controller.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
watched_words_controller.rb FEATURE: Watched words improvements (#7899) 2019-07-22 14:59:56 +03:00
web_hooks_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00