LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: zxy

为啥d4x下载的文件名字前会被加“.”

[复制链接]
发表于 2005-10-24 16:20:10 | 显示全部楼层
我的2.5.5也是这样的,会在名称前加个”.“。
回复 支持 反对

使用道具 举报

发表于 2005-10-25 14:12:27 | 显示全部楼层
我的也是一样的.
回复 支持 反对

使用道具 举报

发表于 2005-10-26 15:18:33 | 显示全部楼层
ft,一样
以前没查看隐藏文件,还以为没下下来呢
回复 支持 反对

使用道具 举报

发表于 2005-10-27 13:08:32 | 显示全部楼层

试试这个补丁

diff -Nru d4x-2.5.5/main/base64.cc d4x-2.5.5-filename/main/base64.cc
--- d4x-2.5.5/main/base64.cc    2005-09-16 12:32:16.000000000 +0800
+++ d4x-2.5.5-filename/main/base64.cc   2005-09-27 16:29:33.000000000 +0800
@@ -13,6 +13,7 @@
#include "base64.h"
#include <string.h>
#include <stdio.h>
+#include <stdint.h>

char Table64[64]={  'A','B','C','D','E','F','G','H',
                    'I','J','K','L','M','N','O','P',
diff -Nru d4x-2.5.5/main/httpd.cc d4x-2.5.5-filename/main/httpd.cc
--- d4x-2.5.5/main/httpd.cc     2005-09-16 12:07:29.000000000 +0800
+++ d4x-2.5.5-filename/main/httpd.cc    2005-09-27 16:03:24.000000000 +0800
@@ -545,12 +545,12 @@
                }else
                        full_path/=ADDR.path;
        };
-       std::string temp=std::string(".")+(ADDR.file.empty()?std::string(CFG.DEFAULT_NAME):ADDR.file);
+       std::string temp=(ADDR.file.empty()?std::string(CFG.DEFAULT_NAME):ADDR.file);
        if (config.http_recursing && !ADDR.params.empty())
                temp+=std::string(config.quest_sign_replace?"_":"?")+ADDR.params;
-       full_path/=temp;
-       *name=copy_string(full_path.c_str());
-       *guess=copy_string(full_path.c_str()+1);
+       *guess=copy_string((full_path/temp).c_str());
+       full_path/=std::string(".")+temp;
+       *name=copy_string(full_path.c_str()+1);
};

void tHttpDownload::make_full_pathes(const char *path,const char *another_name,char **name,char **guess) {
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表