aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: shareddir.dat flag to share directory recursively and periodic scan of new files  (Read 9400 times)

Dante_

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 25

I seriously believe  you should add a flag we could use before or after a line on shareddir.dat, something like:

Code: [Select]
/path/to/directory1
recursive /path/to/directory2

directory1 would be shared non recursively and directory2 would be shared recursively, and scanned regularly (every hour or more often, perhaps a configurable parameter on aMule.conf
Logged
(\_/)
(°_°) <- This is Bunny. Copy Bunny into your signature
(>< ) to help him on his way to world domination.

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming

And how should we integrate this feature into our GUI, which creates shareddir.dat?
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

Dante_

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 25

I guess the GUI should add the "recursive" tag  on the directory line it creates when you click on a folder to make it recursively shared, instead of adding all the subdirs it scanned on the moment.
Anyway, I don't even know if this is the way the GUI adds folders recursively, as I only use amuled on a headless server. Just trying to deduce.
Logged
(\_/)
(°_°) <- This is Bunny. Copy Bunny into your signature
(>< ) to help him on his way to world domination.

^marcell^

  • Developer
  • Hero Member
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 524

I guess the GUI should add the "recursive" tag  on the directory line it creates when you click on a folder to make it recursively shared, instead of adding all the subdirs it scanned on the moment.
Yes, that is the basic idea behind it.

Anyway, I don't even know if this is the way the GUI adds folders recursively, as I only use amuled on a headless server. Just trying to deduce.
The GUI doesn't add folders recursively. You have to select each folder for which you want its content to be shared.

The question was how the user should differ between selecting a folder and selecting the folder and all its subfolders recursively. While this might sound simple for the command line, there has to be a way to do it in the GUI as well. Any suggestions are therefore very welcome.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795

Uh... the GUI does do that, phoenix....
Logged

^marcell^

  • Developer
  • Hero Member
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 524

Sorry, you are right.

Idea: if the user right-clicks a folder it is marked with a special color indicating that it's shared recursively and scanned recursively for new files AND(!) folders with files.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming

We had this discussion some time ago and Kry vetoed changes because of backward compatibility problems or something IIRC.
How is eMule behaving at the moment? If we change anything here we have to break the way we store our shared folders. Then we should use the same file format as eMule (again).
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

^marcell^

  • Developer
  • Hero Member
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 524

I see backward compatibility issues only if one would try to open a shareddir.dat with recusrive folders in an older aMule version that is not aware of that feature. ::)
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795

I don't remember why I vetoed it, so let's pretend I didn't.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming

I see backward compatibility issues only if one would try to open a shareddir.dat with recusrive folders in an older aMule version that is not aware of that feature. ::)
Which is exactly what people are doing who switch back and forth between SVN and 2.2.6.  :)
eMule isn't using any recursive folder sharing either I see.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

^marcell^

  • Developer
  • Hero Member
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 524

I will check how the stable version would handle lines starting with "recursive". Maybe there's a better way to have both working with the same file syntax.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming

How about /path/to/it/. or /path/to/it/* instead of a "recursive" keyword?
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

^marcell^

  • Developer
  • Hero Member
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 524

This might be worth a look. ::)
Still no objections to this feature? The "recursive" keyword makes the file easier to read.
The asterisk could be interpreted as to share only the files in that folder, but not recursively.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming

You found the thread I was too lazy to search.
I don't remember why I vetoed it, so let's pretend I didn't.
The "recursive" keyword makes the file easier to read.
Please check what an older client does when it finds such a line. It should neither crash nor destroy the line if possible.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

^marcell^

  • Developer
  • Hero Member
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 524

Please check what an older client does when it finds such a line. It should neither crash nor destroy the line if possible.
It doesn't crash, but it omits those lines when updating the file so they are not in there anymore. :-\
Logged
Pages: [1] 2