Explorar el Código

* Ported [2737] to 1.2.10 (revert tempdir/packname)

svn: 2738
Bryan Drewery hace 20 años
padre
commit
ccd2bdf08a
Se han modificado 4 ficheros con 5 adiciones y 22 borrados
  1. 3 4
      src/binary.c
  2. 1 5
      src/binary.h
  3. 0 3
      src/main.c
  4. 1 10
      src/misc_file.c

+ 3 - 4
src/binary.c

@@ -29,10 +29,11 @@ settings_t settings = {
   ""
 };
 
-int settings_crypt = PACK_ENC;
-
 static void edpack(settings_t *, const char *, int);
 
+#define PACK_ENC 1
+#define PACK_DEC 2
+
 int checked_bin_buf = 0;
 
 static char *
@@ -300,8 +301,6 @@ static void edpack(settings_t *incfg, const char *in_hash, int what)
   unsigned char *(*enc_dec_string)(const char *, unsigned char *, size_t *);
   size_t len = 0;
 
-  settings_crypt = what;
-
   if (what == PACK_ENC)
     enc_dec_string = encrypt_binary;
   else

+ 1 - 5
src/binary.h

@@ -3,11 +3,7 @@
 
 #include "conf.h"
 
-extern int checked_bin_buf, settings_crypt;
-
-#define PACK_ENC 1
-#define PACK_DEC 2
-
+extern int checked_bin_buf;
 
 #  define GET_CHECKSUM		BIT0
 #  define WRITE_CHECKSUM 	BIT1

+ 0 - 3
src/main.c

@@ -711,9 +711,6 @@ printf("out: %s\n", out);
   if (!checked_bin_buf)
     exit(1);
 
-  /* The tempdir might use the packname, let's attempt anyway.. */
-  Tempfile::FindDir();
-
 #ifdef STOP_UAC
   {
     int nvpair[2] = { SSIN_UACPROC, UAC_NOPRINT };

+ 1 - 10
src/misc_file.c

@@ -279,18 +279,9 @@ void Tempfile::FindDir()
   };
   int i = 0;
   bool found = 0;
-//  char *pack_hash = NULL;
-
-//  if (settings_crypt == PACK_DEC) {
-//    pack_hash = MD5(settings.packname);
-//    pack_hash[5] = 0;
-//  }
 
   for (i = 0; dirs[i]; i++) {
-//    if (pack_hash)
-//      simple_snprintf(tempdir, DIRMAX, "%s.%s/", dirs[i], pack_hash);
-//    else
-      strlcpy(tempdir, dirs[i], DIRMAX);
+    strlcpy(tempdir, dirs[i], DIRMAX);
     if (check_tempdir(0)) {
       found = 1;
       break;