Changeset 4580c6c in nscp


Ignore:
Timestamp:
07/08/09 21:23:39 (4 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2, stable
Children:
79f8b2c
Parents:
dcd5462
Message:

2009-07-05 MickeM

2009-06-20 MickeM

  • Fixed issue with CheckDisk and paths not working out properly

as well as some missing files for the build to work properly

Files:
6 added
7 edited

Legend:

Unmodified
Added
Removed
  • AutoBuild.h

    rdcd5462 r4580c6c  
    33// change the FALSE to TRUE for autoincrement of build number 
    44#define INCREMENT_VERSION TRUE 
    5 #define FILEVER        0,3,7,4 
    6 #define PRODUCTVER     0,3,7,4 
    7 #define STRFILEVER     _T("0.3.7.4") 
    8 #define STRPRODUCTVER  _T("0.3.7.4") 
    9 #define STRPRODUCTDATE  _T("2009-06-20") 
     5#define FILEVER        0,3,7,8 
     6#define PRODUCTVER     0,3,7,8 
     7#define STRFILEVER     _T("0.3.7.8") 
     8#define STRPRODUCTVER  _T("0.3.7.8") 
     9#define STRPRODUCTDATE  _T("2009-07-05") 
    1010#endif // AUTOBUILD_H 
  • changelog

    rdcd5462 r4580c6c  
    66 * Fixa dependonservice LanManWorkStation (old win) 
    77 * Fix RtlStringFromGUID problem on NT4 
     8 
     92009-07-05 MickeM 
     10 * Fixed issue with CheckExternalScripts and script_dir: not adding the commands properly. 
     11 * Fixed issue with CheckExternalScripts and script_dir: not using relative paths (#310). 
    812 
    9132009-06-20 MickeM 
  • modules/CheckDisk/CheckDisk.cpp

    rdcd5462 r4580c6c  
    833833    NSC_error errors; 
    834834    for (std::list<std::wstring>::const_iterator pit = paths.begin(); pit != paths.end(); ++pit) { 
    835       //pattern_type path = split_path(*pit); 
    836835      recursive_scan<file_filter_function_ex>(*pit, pattern, 0, max_dir_depth, finder, &errors); 
    837836      if (finder.hasError()) { 
  • modules/CheckEventLog/CheckEventLog.cpp

    rdcd5462 r4580c6c  
    182182        strEx::replace(real_name, _T("\n"), _T("")); 
    183183        strEx::replace(real_name, _T("\r"), _T("")); 
     184        NSC_DEBUG_MSG(_T("Attempting to match: ") + real_name + _T(" with ") + name); 
    184185        if (real_name == name) 
    185186          return *cit; 
  • modules/CheckExternalScripts/CheckExternalScripts-2005.vcproj

    r3692371 r4580c6c  
    20442044      </File> 
    20452045      <File 
     2046        RelativePath="..\..\include\file_helpers.hpp" 
     2047        > 
     2048      </File> 
     2049      <File 
    20462050        RelativePath="..\..\include\NSCHelper.h" 
    20472051        > 
  • modules/CheckExternalScripts/CheckExternalScripts.cpp

    rb1ac2fa r4580c6c  
    2525#include <config.h> 
    2626#include <msvc_wrappers.h> 
     27#include <file_helpers.hpp> 
    2728 
    2829CheckExternalScripts gCheckExternalScripts; 
     
    3839 
    3940void CheckExternalScripts::addAllScriptsFrom(std::wstring path) { 
    40   std::wstring baseDir; 
     41  file_helpers::patterns::pattern_type pattern = file_helpers::patterns::split_pattern(path); 
     42  if (!file_helpers::checks::exists(pattern.first))  
     43    pattern.first = NSCModuleHelper::getBasePath() + _T("\\") + pattern.first; 
     44  if (!file_helpers::checks::exists(pattern.first)) 
     45    NSC_LOG_ERROR_STD(_T("Path was not found: ") + pattern.first); 
     46/* TODO: do we need this? 
    4147  std::wstring::size_type pos = path.find_last_of('*'); 
    4248  if (pos == std::wstring::npos) { 
    4349    path += _T("*.*"); 
    4450  } 
     51  */ 
    4552  WIN32_FIND_DATA wfd; 
    46   HANDLE hFind = FindFirstFile(path.c_str(), &wfd); 
     53  std::wstring real_path = file_helpers::patterns::combine_pattern(pattern); 
     54  HANDLE hFind = FindFirstFile(real_path.c_str(), &wfd); 
    4755  if (hFind != INVALID_HANDLE_VALUE) { 
    4856    do { 
    4957      if ((wfd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY) { 
    50         addCommand(wfd.cFileName); 
     58        addCommand(wfd.cFileName, pattern.first + _T("\\") + wfd.cFileName, _T("")); 
    5159      } 
    5260    } while (FindNextFile(hFind, &wfd)); 
    5361  } else { 
    54     NSC_LOG_ERROR_STD(_T("No scripts found in path: ") + path); 
     62    NSC_LOG_ERROR_STD(_T("No scripts found in path: ") + real_path); 
    5563    return; 
    5664  } 
  • modules/CheckExternalScripts/CheckExternalScripts.h

    r394f7a1 r4580c6c  
    7979private: 
    8080  void addAllScriptsFrom(std::wstring path); 
    81   void addCommand(strEx::blindstr key, std::wstring cmd = _T(""), std::wstring args = _T("")) { 
     81  void addCommand(strEx::blindstr key, std::wstring cmd, std::wstring args) { 
    8282    commands[key] = command_data(cmd, args); 
    8383  } 
    84   void addAlias(strEx::blindstr key, std::wstring cmd = _T(""), std::wstring args = _T("")) { 
     84  void addAlias(strEx::blindstr key, std::wstring cmd, std::wstring args) { 
    8585    alias[key] = command_data(cmd, args); 
    8686  } 
Note: See TracChangeset for help on using the changeset viewer.