droppyjs / droppy

Self-hosted file storage
https://droppyjs.com
BSD 2-Clause "Simplified" License
107 stars 13 forks source link

unable to change file location #68

Closed MuhannadYT closed 8 months ago

MuhannadYT commented 2 years ago

When I enter droppy start -c D:\droppy\config -f D:\droppy\files for example, droppy launches in C:\Users\[username]\.droppy

markhughes commented 2 years ago

hey @MuhannadYT can you share your version?

droppy -v
MuhannadYT commented 2 years ago

0.2.8

levouh commented 9 months ago

Same thing happens for me on Linux (Ubuntu 22.04) using Node 18 - regardless of the -c and -f options I use, it will use ~/.droppy/.

levouh commented 9 months ago

Is this the issue? When parsing the arguments, it doesn't seem to specify that configdir or filesdir are even valid options?


Perhaps not - it looks like it should just pass through options as they are given if not declared.

Confirmed that the arguments are passed through verbatim by adding some console.log statements:

root@droppy:~# /usr/bin/droppy -c /mnt/nfs/server/droppy/config -f /mnt/nfs/server/droppy/files
{
  _: [],
  color: false,
  d: false,
  daemon: false,
  dev: false,
  c: '/mnt/nfs/server/droppy/config',
  f: '/mnt/nfs/server/droppy/files'
}
/mnt/nfs/server/droppy/config
/mnt/nfs/server/droppy/files

Further, it looks like paths.get is called before paths.seed:

root@droppy:~# /usr/bin/droppy -c /mnt/nfs/server/droppy/config -f /mnt/nfs/server/droppy/files
paths.get
/root/.droppy/config
/root/.droppy/files
paths.get
/root/.droppy/config
/root/.droppy/files
paths.get
/root/.droppy/config
/root/.droppy/files
paths.get
/root/.droppy/config
/root/.droppy/files
paths.get
/root/.droppy/config
/root/.droppy/files
paths.get
/root/.droppy/config
/root/.droppy/files
paths.get
/root/.droppy/config
/root/.droppy/files
paths.seed
/mnt/nfs/server/droppy/config
/mnt/nfs/server/droppy/files

Is it really just that paths.get() is called on the server start and not refreshed after .seed() is called?