stash icon indicating copy to clipboard operation
stash copied to clipboard

[Bug Report] Errors and Strange Behavior When Adding Paths to Disconnected Drives in Configuration File

Open Cyb3rN3xus opened this issue 1 year ago • 0 comments

Describe the bug After a recent update, it appears that the functionality to add paths to disconnected drives in the configuration file has been altered or broken. Previously, users could add paths to disconnected drives to the library paths, allowing for the scanning of these drives whenever they were connected without issue. Now, attempting to add a path that does not currently exist through the usual interface does not write to the configuration file. Manually adding the path to the configuration file results in errors and unexpected behavior. For example, errors are thrown for directories (/mnt/hdd1/public and /mnt/hdd/public) that were not manually added to the configuration file.

To Reproduce

Steps to reproduce the behavior:

  • Attempt to add a path to a disconnected drive through the application's usual interface. Notice that the path does not get added to the configuration file.
  • Add paths manually to the configuration file, in this case /mnt/hdd2 is connected while /mnt/hdd0 is disconnected.
stash:
    - excludeimage: true
      excludevideo: false
      path: /mnt/hdd0/public/nsfw
    - excludeimage: true
      excludevideo: false
      path: /mnt/hdd2/public/nsfw
  • Observe errors related to directories not being found, including errors for directories not manually added to the configuration file (/mnt/hdd1/public and /mnt/hdd/public), as well as errors for the manually added disconnected drive paths (/mnt/hdd0/public).
ERRO[2024-03-20 14:17:50] directory: input: directory open /mnt/hdd1/public: no such file or directory
2024-03-20T14:17:50.968657955+01:00 INF Response: 200 OK httpRequest={"proto":"HTTP/1.1","remoteIP":"127.0.0.1:35718","requestID":"arch/qW0YRyQih3-000174","requestMethod":"POST","requestPath":"/graphql","requestURL":"http://localhost:9999/graphql"} httpResponse={"bytes":115,"elapsed":0.29896,"status":200} service=stash
ERRO[2024-03-20 14:17:51] directory: input: directory open /mnt/hdd/public: no such file or directory
2024-03-20T14:17:51.847724548+01:00 INF Response: 200 OK httpRequest={"proto":"HTTP/1.1","remoteIP":"127.0.0.1:35718","requestID":"arch/qW0YRyQih3-000175","requestMethod":"POST","requestPath":"/graphql","requestURL":"http://localhost:9999/graphql"} httpResponse={"bytes":113,"elapsed":0.492438,"status":200} service=stash
ERRO[2024-03-20 14:17:52] directory: input: directory open /mnt/hdd0/public: no such file or directory
2024-03-20T14:17:52.163989698+01:00 INF Response: 200 OK httpRequest={"proto":"HTTP/1.1","remoteIP":"127.0.0.1:35718","requestID":"arch/qW0YRyQih3-000176","requestMethod":"POST","requestPath":"/graphql","requestURL":"http://localhost:9999/graphql"} httpResponse={"bytes":114,"elapsed":0.251539,"status":200} service=stash
ERRO[2024-03-20 14:17:54] configureGeneral: input: configureGeneral file does not exist
2024-03-20T14:17:54.736051908+01:00 INF Response: 200 OK httpRequest={"proto":"HTTP/1.1","remoteIP":"127.0.0.1:35718","requestID":"arch/qW0YRyQih3-000177","requestMethod":"POST","requestPath":"/graphql","requestURL":"http://localhost:9999/graphql"} httpResponse={"bytes":103,"elapsed":0.461709,"status":200} service=stash
ERRO[2024-03-20 14:18:22] directory: input: directory open /mnt/hdd0/public: no such file or directory
2024-03-20T14:18:22.155940446+01:00 INF Response: 200 OK httpRequest={"proto":"HTTP/1.1","remoteIP":"127.0.0.1:35718","r

Expected behavior

The expected behavior is that users should be able to add paths to disconnected drives either through the application's interface or by manually editing the configuration file without encountering errors. At most, the application should issue a warning about the drive being disconnected or the path not existing at the time of addition. The application should gracefully handle these paths, scanning them when the drives are connected without throwing errors for unrelated paths or disrupting the user's workflow.

Stash Version: v0.25.1

Desktop (please complete the following information):

  • OS: Manjaro Linux
  • Browser: Firefox
  • Version: 124

Cyb3rN3xus avatar Mar 20 '24 13:03 Cyb3rN3xus