jhalter / mobius

A Hotline server implemented in Golang for macOS, Linux, and Windows operating systems
MIT License
76 stars 8 forks source link

Can't download folder #97

Closed Knezzen closed 11 months ago

Knezzen commented 1 year ago

Hi!

Tried to download a folder using GLoarbLine 1.9.7 and it fails with an error message saying "Specified folder does not exist". Same issue happens with Hotline 1.2.3 and Pitbull Pro, but without any error message. The same rows in the log file appears:

2023-03-23T15:18:03.406+0100    info    Start folder download   {"remoteAddr": "158.174.146.146:49179", "login": "guest", "name": "Knezzen", "path": "/opt/mobius/config/Files/Source Code"}
2023-03-23T15:18:03.406+0100    debug   Sending fileheader      {"remoteAddr": "158.174.146.146:49179", "login": "guest", "name": "Knezzen", "i": 1, "path": "/opt/mobius/config/Files/Source Code/", "fullFilePath": "/opt/mobius/config/Files/Source Code", "subPath": "", "IsDir": true}
2023-03-23T15:18:03.406+0100    debug   Sending fileheader      {"remoteAddr": "158.174.146.146:49179", "login": "guest", "name": "Knezzen", "i": 3, "path": "/opt/mobius/config/Files/Source Code/.finderinfo/BASIC", "fullFilePath": "/opt/mobius/config/Files/Source Code", "subPath": ".finderinfo/BASIC", "IsDir": false}
2023-03-23T15:18:06.412+0100    error   file transfer error     {"reason": "read tcp 192.168.68.116:5501->158.174.146.146:49179: read: connection reset by peer"}

BASIC is a dir, so I don't really understand the error. It lists just fine from within the clients etc.

Thanks for your hard work, Jeff!

jhalter commented 1 year ago

Suspicious that the path has a leading dot in the name. This might have something to do with the default IgnoreFiles config that I added to ignore resource forks in config.yml:

# List of Regular Expression filters for the Files list
IgnoreFiles:
  - '^\.'     # Ignore all files starting with ".".  Leave this set if you are using the PreserveResourceForks option.
  - '^@'       # Ignore all files starting with "@"

Can you try replacing this overly loos pattern match line:

 - '^\.' 

With the more tightly scoped:

  - '^\.rsrc_'
  - '^\.info_'

If this works for you, I'll update the default config.

Knezzen commented 1 year ago

Still getting the same issue, despite editing the config.

2023-03-24T10:21:03.340+0100    debug   Received Transaction    {"remoteAddr": "158.174.146.146:49157", "login": "knezzen", "name": "Knezzen", "RequestType": "tranDownloadFldr"}
2023-03-24T10:21:03.368+0100    info    Start folder download   {"remoteAddr": "158.174.146.146:49158", "login": "knezzen", "name": "Knezzen", "path": "/opt/mobius/config/Files/Source Code"}
2023-03-24T10:21:03.368+0100    debug   Sending fileheader      {"remoteAddr": "158.174.146.146:49158", "login": "knezzen", "name": "Knezzen", "i": 1, "path": "/opt/mobius/config/Files/Source Code/", "fullFilePath": "/opt/mobius/config/Files/Source Code", "subPath": "", "IsDir": true}
2023-03-24T10:21:03.368+0100    debug   Sending fileheader      {"remoteAddr": "158.174.146.146:49158", "login": "knezzen", "name": "Knezzen", "i": 3, "path": "/opt/mobius/config/Files/Source Code/.finderinfo/BASIC", "fullFilePath": "/opt/mobius/config/Files/Source Code", "subPath": ".finderinfo/BASIC", "IsDir": false}
2023-03-24T10:21:06.378+0100    error   file transfer error     {"reason": "read tcp 192.168.68.116:5501->158.174.146.146:49158: read: connection reset by peer"}
Knezzen commented 1 year ago

Hm.... .finderinfo is a directory. Is it something mobius adds? Otherwise it's probably a leftover from our old server, hxd and it's way of preserving resource forks.

Knezzen commented 1 year ago

I solved it. It was .finderinfo and .resource directories scattered around the hotline file paths that did it. Stuff left over from when we ran hxd on the server. I removed the directories and all is well now.