Autotools, Samba (Deban Lenny), Snow Leopard

peshua19

Member
May 25, 2018
897
0
16
Hi all.
Not so long ago i started using autotools, but it marked all my torrent files as .fail.

Setup:
Linux server running Debian Lenny with Samba shares, rtorrent 0.8.6/0.12.6 stable.
Snow Leopard > Saving torrent files to Samba shares

In the Debug log i found that it tries to load two torrent files of the same name:
[16.10.10 13:28:07] AutoWatch: --- begin ---
[16.10.10 13:28:07] AutoWatch: enabled : 1
[16.10.10 13:28:07] AutoWatch: autostart : 1
[16.10.10 13:28:07] AutoWatch: path_to_watch : /mnt/Torrents/watch/
[16.10.10 13:28:07] AutoWatch: get_directory : /mnt/Torrents/Downloading/
[16.10.10 13:28:07] AutoWatch: torrent file : /mnt/Torrents/watch/Misc/._Ubuntu.10.10_i386.torrent
[16.10.10 13:28:07] AutoWatch: save data to : /mnt/Torrents/Downloading/Misc/
[16.10.10 13:28:07] AutoWatch: rtAddTorrent() fail
[16.10.10 13:28:07] AutoWatch: torrent file : /mnt/Torrents/watch/Misc/Ubuntu.10.10_i386.torrent
[16.10.10 13:28:07] AutoWatch: save data to : /mnt/Torrents/Downloading/Misc/
[16.10.10 13:28:07] AutoWatch: rtAddTorrent() fail
[16.10.10 13:28:07] AutoWatch: --- end ---

The first one is a mac resource fork file. Autotools marks it as fail 'cause it's not a torrent file. But after that it marks the real torrent file as fail to. So i ended up with a bunch of .fail torrent files and none of them being added to rtorrent.
Solution:
Add the code below to watch.php. It'll delete the fork files.
Code:
.........
// Scan for *.torrent files at $path_to_watch
if( $is_ok )
{

// Delete MacOSX fork files ._

$del_forks = rtScanFiles ( $path_to_watch, "._*", true );
foreach( $del_forks as $del_fork)
{
$to_delete = $path_to_watch.$del_fork;
echo $to_delete;
unlink($to_delete);
}

// End Delete fork files
$files = rtScanFiles( $path_to_watch, "*.torrent", true ); // ignore case
.................

Hope this will help some of you with similar problems...
grin.gif
 

lisas4567

Member
May 25, 2018
773
0
16
yah, this is an osx issue. You can set osx not to create the dot-dash files on network shares by doing:
Code
defaults write com.apple.desktopservices DSDontWriteNetworkStores true



I ended up using webdav for my directory and using rewrite rules in apache to make sure the files never get created in the first place.