             {SCHEMA, client_db} = require('smc-util/schema')
             return SCHEMA.public_paths.user_query.set.fields.id({project_id:project_id, path:path}, client_db)
 
-    sort_by_time: (other_settings) ->
-        if not @get('sort_by_time')
-            return other_settings.get('default_file_sort') == 'time'
+    # TODO: Change input functions like this to use getInitialState
+    sort_by_time: ->
+        return @get('sort_by_time') ? @redux.getStore('account').getIn(['other_settings', 'default_file_sort']) == 'time'
 
     # cached pre-processed file listing, which should always be up to date when
     # called, and properly depends on dependencies.

    search: =>
        store = @get_store()

        query = store.get('user_input').trim().replace(/"/g, '\\"')
        if query is ''
            return
        search_query = '"' + query + '"'

        # generate the grep command for the given query with the given flags
        if store.get('case_sensitive')
            ins = ''
        else
            ins = ' -i '

        if store.get('subdirectories')
            if store.get('hidden_files')
                cmd = "rgrep -I -H --exclude-dir=.smc --exclude-dir=.snapshots #{ins} #{search_query} -- *"
            else
                cmd = "rgrep -I -H --exclude-dir='.*' --exclude='.*' #{ins} #{search_query} -- *"
        else
            if store.get('hidden_files')
                cmd = "grep -I -H #{ins} #{search_query} -- .* *"
            else
                cmd = "grep -I -H #{ins} #{search_query} -- *"

            max_output      : max_output
            bash            : true
            err_on_exit     : true
            path            : store.current_path
            cb              : (err, output) =>
                @process_results(err, output, max_results, max_output, cmd)

