Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloaded mods are stored with wrong filenames #6

Open
adamryczkowski opened this issue Jul 30, 2024 · 3 comments
Open

Downloaded mods are stored with wrong filenames #6

adamryczkowski opened this issue Jul 30, 2024 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@adamryczkowski
Copy link

adamryczkowski commented Jul 30, 2024

Here's the log after calling it with

facmod-rs -c update_factorio.yaml  --mod_list mods/mod-list.json 
[2024-07-30T16:41:38Z INFO  facmod_rs::facmod] Loading Config: /opt/factorio/update_factorio.yaml
[2024-07-30T16:41:38Z INFO  facmod_rs::facmod] Loading json file: /opt/factorio/mods/mod-list.json
[2024-07-30T16:41:38Z INFO  facmod_rs::facmod] Searching mod: AutoDeconstruct
[2024-07-30T16:41:38Z INFO  facmod_rs::facmod] Found mod: AutoDeconstruct
[2024-07-30T16:41:38Z INFO  facmod_rs::facmod] Searching mod: Bottleneck
[2024-07-30T16:41:38Z INFO  facmod_rs::facmod] Found mod: Bottleneck
[2024-07-30T16:41:38Z INFO  facmod_rs::facmod] Searching mod: bullet-trails
[2024-07-30T16:41:39Z INFO  facmod_rs::facmod] Found mod: bullet-trails
[2024-07-30T16:41:39Z INFO  facmod_rs::facmod] Searching mod: DiscoScience
[2024-07-30T16:41:39Z INFO  facmod_rs::facmod] Found mod: DiscoScience
[2024-07-30T16:41:39Z INFO  facmod_rs::facmod] Searching mod: even-distribution
[2024-07-30T16:41:39Z INFO  facmod_rs::facmod] Found mod: even-distribution
[2024-07-30T16:41:39Z INFO  facmod_rs::facmod] Searching mod: far-reach
[2024-07-30T16:41:39Z INFO  facmod_rs::facmod] Found mod: far-reach
[2024-07-30T16:41:39Z INFO  facmod_rs::facmod] Searching mod: flib
[2024-07-30T16:41:39Z INFO  facmod_rs::facmod] Found mod: flib
[2024-07-30T16:41:39Z INFO  facmod_rs::facmod] Searching mod: helmod
[2024-07-30T16:41:39Z INFO  facmod_rs::facmod] Found mod: helmod
[2024-07-30T16:41:39Z INFO  facmod_rs::facmod] Searching mod: Milestones
[2024-07-30T16:41:39Z INFO  facmod_rs::facmod] Found mod: Milestones
[2024-07-30T16:41:39Z INFO  facmod_rs::facmod] Searching mod: ModuleInserterSimplified
[2024-07-30T16:41:40Z INFO  facmod_rs::facmod] Found mod: ModuleInserterSimplified
[2024-07-30T16:41:40Z INFO  facmod_rs::facmod] Searching mod: robot_attrition
[2024-07-30T16:41:40Z INFO  facmod_rs::facmod] Found mod: robot_attrition
[2024-07-30T16:41:40Z INFO  facmod_rs::facmod] Searching mod: Squeak Through
[2024-07-30T16:41:40Z INFO  facmod_rs::facmod] Found mod: Squeak Through
[2024-07-30T16:41:40Z INFO  facmod_rs::facmod] Searching mod: Todo-List
[2024-07-30T16:41:40Z INFO  facmod_rs::facmod] Found mod: Todo-List
[2024-07-30T16:41:40Z INFO  facmod_rs::facmod] Searching mod: tree_collision
[2024-07-30T16:41:40Z INFO  facmod_rs::facmod] Found mod: tree_collision
[2024-07-30T16:41:40Z INFO  facmod_rs::facmod] Searching mod: Waterfill_Fork
[2024-07-30T16:41:40Z INFO  facmod_rs::facmod] Found mod: Waterfill_Fork
[2024-07-30T16:41:40Z INFO  facmod_rs::facmod] Checking mods folder: /opt/factorio/mods/
[2024-07-30T16:41:40Z INFO  facmod_rs::facmod] Downloading mods into /opt/factorio/mods/
[2024-07-30T16:41:40Z INFO  facmod_rs::facmod] Downloading: AutoDeconstruct
[2024-07-30T16:41:40Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/AutoDeconstruct/668de852d7aca17770d482e6
Downloading https://mods.factorio.com/download/AutoDeconstruct/668de852d7aca17770d482e6
Downloaded abf3bd72d47f39759a8611a95c16f1f8fe993e to /opt/factorio/mods/
  [00:00:00] [#################################################] 75.86KiB/75.86KiB (1.99MiB/s, 0s)
[2024-07-30T16:41:41Z INFO  facmod_rs::facmod] Downloading: Bottleneck
[2024-07-30T16:41:41Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/Bottleneck/5fbe065fbdbc78df51eb111a
Downloading https://mods.factorio.com/download/Bottleneck/5fbe065fbdbc78df51eb111a
Downloaded db3f08e7dba835e2b12f861a1f202a4c49fe8a to /opt/factorio/mods/
  [00:00:00] [#################################################] 71.54KiB/71.54KiB (5.42MiB/s, 0s)
[2024-07-30T16:41:41Z INFO  facmod_rs::facmod] Downloading: bullet-trails
[2024-07-30T16:41:41Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/bullet-trails/6229469f6d5a4787343dc6a3
Downloading https://mods.factorio.com/download/bullet-trails/6229469f6d5a4787343dc6a3
Downloaded 17c11b6f347da92dc5b0ceccd94732e6f4baa3 to /opt/factorio/mods/
  [00:00:00] [#################################################] 71.20KiB/71.20KiB (7.57MiB/s, 0s)
[2024-07-30T16:41:41Z INFO  facmod_rs::facmod] Downloading: DiscoScience
[2024-07-30T16:41:41Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/DiscoScience/6635ea0b27eb4a2c0000952f
Downloading https://mods.factorio.com/download/DiscoScience/6635ea0b27eb4a2c0000952f
Downloaded 352270e890c4f2d85bbe7d3fba5eb08d58f06a to /opt/factorio/mods/
  [00:00:00] [##################################################] 1.36MiB/1.36MiB (10.15MiB/s, 0s)
[2024-07-30T16:41:41Z INFO  facmod_rs::facmod] Downloading: even-distribution
[2024-07-30T16:41:41Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/even-distribution/611ff8effdd9bd808d2dc9ed
Downloading https://mods.factorio.com/download/even-distribution/611ff8effdd9bd808d2dc9ed
Downloaded 6d1b2a1410cc35b18073400a4e65a0d3d63c4b to /opt/factorio/mods/
  [00:00:00] [###############################################] 359.27KiB/359.27KiB (3.65MiB/s, 0s)
[2024-07-30T16:41:42Z INFO  facmod_rs::facmod] Downloading: far-reach
[2024-07-30T16:41:42Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/far-reach/64fdbf2195e56b282f0681d0
Downloading https://mods.factorio.com/download/far-reach/64fdbf2195e56b282f0681d0
Downloaded 3761b8b1f90683cc6ec93dd310cf8281c71c5b to /opt/factorio/mods/
  [00:00:00] [################################################] 47.69KiB/47.69KiB (59.60MiB/s, 0s)
[2024-07-30T16:41:42Z INFO  facmod_rs::facmod] Downloading: flib
[2024-07-30T16:41:42Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/flib/66a5b7728118f885d2c8d9d3
Downloading https://mods.factorio.com/download/flib/66a5b7728118f885d2c8d9d3
Downloaded 469f22aec2f28def25a627981ace9696f158c8 to /opt/factorio/mods/
  [00:00:00] [###############################################] 448.37KiB/448.37KiB (3.42MiB/s, 0s)
[2024-07-30T16:41:42Z INFO  facmod_rs::facmod] Downloading: helmod
[2024-07-30T16:41:42Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/helmod/66a6b6075264dbd26b0be0de
Downloading https://mods.factorio.com/download/helmod/66a6b6075264dbd26b0be0de
Downloaded 8723b66772c5f3684954d60533c31636cdd3a3 to /opt/factorio/mods/
  [00:00:01] [###################################################] 3.31MiB/3.31MiB (3.13MiB/s, 0s)
[2024-07-30T16:41:43Z INFO  facmod_rs::facmod] Downloading: Milestones
[2024-07-30T16:41:43Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/Milestones/65e4de9e7ccad6d1c3ea64cc
Downloading https://mods.factorio.com/download/Milestones/65e4de9e7ccad6d1c3ea64cc
Downloaded 320b1af8b0793172e21e7f97d80b461df734cf to /opt/factorio/mods/
  [00:00:00] [###############################################] 136.22KiB/136.22KiB (7.28MiB/s, 0s)
[2024-07-30T16:41:44Z INFO  facmod_rs::facmod] Downloading: ModuleInserterSimplified
[2024-07-30T16:41:44Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/ModuleInserterSimplified/648a679b41acc6831dbf514f
Downloading https://mods.factorio.com/download/ModuleInserterSimplified/648a679b41acc6831dbf514f
Downloaded 9b7933939e88b325ee3c7f41b262818b43ad9d to /opt/factorio/mods/
  [00:00:00] [################################################] 41.81KiB/41.81KiB (45.41MiB/s, 0s)
[2024-07-30T16:41:44Z INFO  facmod_rs::facmod] Downloading: robot_attrition
[2024-07-30T16:41:44Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/robot_attrition/6453651f47b4a83b970cfad7
Downloading https://mods.factorio.com/download/robot_attrition/6453651f47b4a83b970cfad7
Downloaded c83c45c2c58d660215005c8e951e3d1021ffb4 to /opt/factorio/mods/
  [00:00:00] [################################################] 41.14KiB/41.14KiB (59.60MiB/s, 0s)
[2024-07-30T16:41:44Z INFO  facmod_rs::facmod] Downloading: Squeak Through
[2024-07-30T16:41:44Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/Squeak%20Through/6032fc4d5b18e49cf1c09118
Downloading https://mods.factorio.com/download/Squeak%20Through/6032fc4d5b18e49cf1c09118
Downloaded 3f2a0facadee8a7548c6a628d038a49a7bd275 to /opt/factorio/mods/
  [00:00:00] [################################################] 39.02KiB/39.02KiB (52.98MiB/s, 0s)
[2024-07-30T16:41:44Z INFO  facmod_rs::facmod] Downloading: Todo-List
[2024-07-30T16:41:44Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/Todo-List/63d78061a19868f8b2e2c01b
Downloading https://mods.factorio.com/download/Todo-List/63d78061a19868f8b2e2c01b
Downloaded b781e287a5556e691835566b1ed34183ed9a88 to /opt/factorio/mods/
  [00:00:00] [################################################] 49.24KiB/49.24KiB (52.98MiB/s, 0s)
[2024-07-30T16:41:44Z INFO  facmod_rs::facmod] Downloading: tree_collision
[2024-07-30T16:41:44Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/tree_collision/5fbc73f3e78eac78f22efe30
Downloading https://mods.factorio.com/download/tree_collision/5fbc73f3e78eac78f22efe30
Downloaded ad7989bbad00aad9f4ab10e59f6299248c4d46 to /opt/factorio/mods/
  [00:00:00] [################################################] 45.30KiB/45.30KiB (59.60MiB/s, 0s)
[2024-07-30T16:41:44Z INFO  facmod_rs::facmod] Downloading: Waterfill_Fork
[2024-07-30T16:41:44Z INFO  facmod_rs::util] Submitting GET request to https://mods.factorio.com/download/Waterfill_Fork/627e86f142e9b2f218622393
Downloading https://mods.factorio.com/download/Waterfill_Fork/627e86f142e9b2f218622393
Downloaded 3f214b91cda36a3a919741ca0297a44281b0cc to /opt/factorio/mods/
  [00:00:00] [###############################################] 136.17KiB/136.17KiB (7.39MiB/s, 0s)

My update-factorio.yaml:

username: "<username>"
api_token: "<API token>"
mod_dir: "/opt/factorio/mods/"

In the mods directory, the downloaded files are stored with filenames being some form of fingerprint:

-rw-rw-r--  1 adam adam   72913 Jul 30 16:41  17c11b6f347da92dc5b0ceccd94732e6f4baa3
-rw-rw-r--  1 adam adam  139494 Jul 30 16:41  320b1af8b0793172e21e7f97d80b461df734cf
-rw-rw-r--  1 adam adam 1427573 Jul 30 16:41  352270e890c4f2d85bbe7d3fba5eb08d58f06a
-rw-rw-r--  1 adam adam   48835 Jul 30 16:41  3761b8b1f90683cc6ec93dd310cf8281c71c5b
-rw-rw-r--  1 adam adam  139440 Jul 30 16:41  3f214b91cda36a3a919741ca0297a44281b0cc
-rw-rw-r--  1 adam adam   39959 Jul 30 16:41  3f2a0facadee8a7548c6a628d038a49a7bd275
-rw-rw-r--  1 adam adam  459133 Jul 30 16:41  469f22aec2f28def25a627981ace9696f158c8
-rw-rw-r--  1 adam adam  367892 Jul 30 16:41  6d1b2a1410cc35b18073400a4e65a0d3d63c4b
-rw-rw-r--  1 adam adam 3470524 Jul 30 16:41  8723b66772c5f3684954d60533c31636cdd3a3
-rw-rw-r--  1 adam adam   42815 Jul 30 16:41  9b7933939e88b325ee3c7f41b262818b43ad9d
-rw-rw-r--  1 adam adam   77681 Jul 30 16:41  abf3bd72d47f39759a8611a95c16f1f8fe993e
-rw-rw-r--  1 adam adam   46385 Jul 30 16:41  ad7989bbad00aad9f4ab10e59f6299248c4d46
-rw-rw-r--  1 adam adam   70414 May  1 17:48  AutoDeconstruct_0.3.12.zip
-rw-rw-r--  1 adam adam   50420 Jul 30 16:41  b781e287a5556e691835566b1ed34183ed9a88
-rw-rw-r--  1 adam adam   73255 Sep  5  2023  Bottleneck_0.11.7.zip
-rw-rw-r--  1 adam adam   72913 Sep  5  2023  bullet-trails_0.6.2.zip
-rw-rw-r--  1 adam adam   42124 Jul 30 16:41  c83c45c2c58d660215005c8e951e3d1021ffb4
-rw-rw-r--  1 adam adam   73255 Jul 30 16:41  db3f08e7dba835e2b12f861a1f202a4c49fe8a
-rw-rw-r--  1 adam adam 1427778 Sep  5  2023  DiscoScience_1.1.3.zip
-rw-rw-r--  1 adam adam  367892 Sep  5  2023  even-distribution_1.0.10.zip
-rw-rw-r--  1 adam adam   48835 Sep 28  2023  far-reach_1.1.3.zip
-rw-rw-r--  1 adam adam  459042 May  1 17:48  flib_0.14.0.zip
-rw-rw-r--  1 adam adam 3354982 May  1 17:48  helmod_1.0.9.zip
-rw-rw-r--  1 adam adam  139494 May  1 17:49  Milestones_1.3.25.zip
-rw-rw-r--  1 adam adam    1141 May  1 18:37  mod-list.json
-rw-rw-r--  1 adam adam    8393 May  1 18:15  mod-settings.dat
-rw-rw-r--  1 adam adam   42815 Sep  5  2023  ModuleInserterSimplified_1.1.4.zip
-rw-rw-r--  1 adam adam   42124 Sep  5  2023  robot_attrition_0.5.15.zip
-rw-rw-r--  1 adam adam   39959 Sep  5  2023 'Squeak Through_1.8.2.zip'
-rw-rw-r--  1 adam adam   50420 Sep  5  2023  Todo-List_19.3.0.zip
-rw-rw-r--  1 adam adam   46385 Sep  5  2023  tree_collision_1.1.0.zip
-rw-rw-r--  1 adam adam  139440 Sep  9  2023  Waterfill_Fork_1.0.0.zip
$ bin/x64/factorio --version
Version: 1.1.109 (build 62320, linux64, headless)
Binary version: 64
Map input version: 0.18.0-0
Map output version: 1.1.109-0
@ngraham20
Copy link
Owner

Hey! Did you install from source, or did you install with cargo install facmod-rs?

@ngraham20 ngraham20 added the bug Something isn't working label Aug 6, 2024
@ngraham20 ngraham20 self-assigned this Aug 6, 2024
@ngraham20
Copy link
Owner

Actually, it doesn't appear to be a result of the version, so don't worry about that. This appears to be from the fact that the host URL looks like this: https://mods.factorio.com/download/even-distribution/611ff8effdd9bd808d2dc9ed. When downloading it manually by visiting the page, the .zip file is named correctly, however the name in my sourcecode is gleaned directly from the URL.

The file is still a zip file, it's just named weird.

Out of curiosity, does the server still accept the mods as valid, or do the names break it?

@ngraham20 ngraham20 removed their assignment Aug 6, 2024
@ngraham20 ngraham20 added the help wanted Extra attention is needed label Aug 6, 2024
@adamryczkowski
Copy link
Author

adamryczkowski commented Aug 8, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants