wakhidprasetyo / rutorrent

Automatically exported from code.google.com/p/rutorrent
0 stars 0 forks source link

Erasedata doesn't exactly erasedata #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I delete torrent + data, it deletes ALL the data but not the folders so I'm 
stuck 
with a bunch of empty dirs..

It also doesn't delete the dirs inside the data so again left with a bunch of 
empty dirs. Thanks

Original issue reported on code.google.com by admin%st...@gtempaccount.com on 31 Jul 2009 at 5:25

GoogleCodeExporter commented 9 years ago
I have the exact same problem..it's a minor annoyance but it's not a huge 
problem

Original comment by Wonslung@gmail.com on 1 Aug 2009 at 6:54

GoogleCodeExporter commented 9 years ago
2Novik65:
You can use function RemoveDirectory() from autotools plugin (at_utils.php)
// Recursively remove empty dirs without files
RemoveDirectory( $dir, false );

Original comment by dmrom00 on 1 Aug 2009 at 7:32

GoogleCodeExporter commented 9 years ago
But why should we have to get yet another plugin to erase the empty dir, delete 
data 
should delete dirs as well

Original comment by admin%st...@gtempaccount.com on 1 Aug 2009 at 7:57

GoogleCodeExporter commented 9 years ago
This is a normal behavior and it is described in documentation. This can't be 
fixed
at this moment.

Original comment by novik65 on 1 Aug 2009 at 8:15

GoogleCodeExporter commented 9 years ago
if i remember right it has something to do with FAT and NTFS based volumes.  It 
also
happens when you use selective download...if still makes the dir if i remember 
right

it's not a big deal for me. I'm happy with the features so far

Original comment by Wonslung@gmail.com on 1 Aug 2009 at 12:27

GoogleCodeExporter commented 9 years ago
Comment 2  by dmrom00, Yesterday (34 hours ago)

2Novik65:
You can use function RemoveDirectory() from autotools plugin (at_utils.php)
// Recursively remove empty dirs without files
RemoveDirectory( $dir, false );
----

How do I use this ? What settings do I need ? how do I activate this plugin ?

Original comment by rascal...@gmail.com on 2 Aug 2009 at 5:42

GoogleCodeExporter commented 9 years ago
Yea same here, in autotools (at_utils) there is no option for that

Original comment by admin%st...@gtempaccount.com on 2 Aug 2009 at 5:56

GoogleCodeExporter commented 9 years ago
guys, you edit it into the actual file
in your plugin directory 
it's rutorrent/plugins/autotools/
then you edit the file at_utils.php and add the line novik is talking about.

Original comment by Wonslung@gmail.com on 2 Aug 2009 at 9:45

GoogleCodeExporter commented 9 years ago
No but where do you add it? What line?

Original comment by admin%st...@gtempaccount.com on 2 Aug 2009 at 10:38

GoogleCodeExporter commented 9 years ago
Wait a little, I'll modify erasedata to cleanup empty dirs.
I've got Novik's approval to do this :)

Original comment by dmrom00 on 3 Aug 2009 at 5:50

GoogleCodeExporter commented 9 years ago

Original comment by novik65 on 14 Aug 2009 at 1:06

GoogleCodeExporter commented 9 years ago
Done. Update erasedata plugin from SVN.

Original comment by dmrom00 on 17 Aug 2009 at 5:17

GoogleCodeExporter commented 9 years ago
it works perfect now.

Tx

Original comment by rascal...@gmail.com on 17 Aug 2009 at 6:15

GoogleCodeExporter commented 9 years ago
shouldn't someone integrate this into version that we download from here?

Original comment by aparc...@gmail.com on 1 Dec 2009 at 5:55

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Last version of plugin is added to download section.

Original comment by novik65 on 2 Dec 2009 at 8:39

GoogleCodeExporter commented 9 years ago
I've got all the latest versions downloaded but it still doesnt delete the
directories and I cannot the line

// Recursively remove empty dirs without files
RemoveDirectory( $dir, false );

in any of the the PHP files. 

Am I missing something?

Original comment by albyhorr...@gmail.com on 14 Dec 2009 at 12:42

GoogleCodeExporter commented 9 years ago
enable log in cleanup.sh and look into result log-file.
if problem will not become clear - attach it here.

Original comment by dmrom00 on 15 Dec 2009 at 3:04

GoogleCodeExporter commented 9 years ago
@albyhorrocks
do you have php path set in config.php
do you have php-cli installed?
i know many problems i've had were due to php not set in 
$WEBROOT/rtorrent/config.php
not having a valid php-cli or a misconfigured php-cli.ini

Original comment by Wonslung@gmail.com on 15 Dec 2009 at 4:17

GoogleCodeExporter commented 9 years ago
Тоже напоролся на ошибки в этом дополнении 
- не удалялись каталоги с пробелами, в
случае нахождения cleanup.sh на разделе с noexec не 
удалялись все каталоги. Вроде я
исправил, но проверял только на линуксе с 
bash.

Советы на будущее:
1) в случае shell скриптов надо использовать 
для всех путей только "${dir}", а не
$dir или "$dir".
2) для безопасности часто монтируют разделы 
с noexec,nodev,nosuid, проверять на права
выполняемости бесполезно, нужно 
использовать команды "интерпретатор 
./путь/к/скрипту"
вместо "./путь/к/скрипту".

Original comment by Nickollai on 20 Mar 2010 at 8:23

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by novik65 on 20 Mar 2010 at 10:52

GoogleCodeExporter commented 9 years ago
Встретил и исправил ещё одну неприятность. 
Не удалялись пустые подкаталоги. Скрипт
стал проще и более не запускает 
многочисленные копии себя.

Original comment by Nickollai on 21 Mar 2010 at 6:26

Attachments:

GoogleCodeExporter commented 9 years ago
Поправил, спасибо.

Original comment by novik65 on 23 Mar 2010 at 1:08