Changeset 628 in code for trunk


Ignore:
Timestamp:
Oct 12, 2021, 3:36:00 PM (4 years ago)
Author:
contact
Message:

msgstore_fs: fix ListTargets error on missing log dir

Initially, before connecting to the network, the log dir will be
empty. Return an empty list of chat history targets in this case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/msgstore_fs.go

    r610 r628  
    481481        rootPath := filepath.Join(ms.root, escapeFilename(network.GetName()))
    482482        root, err := os.Open(rootPath)
    483         if err != nil {
     483        if os.IsNotExist(err) {
     484                return nil, nil
     485        } else if err != nil {
    484486                return nil, err
    485487        }
Note: See TracChangeset for help on using the changeset viewer.