Commits
43 43 | |
44 44 | std::string copy_input_ms; |
45 45 | try { |
46 46 | std::string source_input_ms; |
47 47 | if (argc < 2) |
48 48 | { |
49 49 | String casadata = EnvironmentVariable::get("CASADATA"); |
50 50 | if (casadata.empty()) { |
51 51 | throw(AipsError("CASADATA env variable not defined and no file given in command line")); |
52 52 | } |
53 - | source_input_ms = casadata + "/unittest/hanningsmooth/ngc5921_ut.ms/"; |
53 + | source_input_ms = casadata + "/unittest/hanningsmooth/ngc5921_ut.ms"; |
54 54 | } |
55 55 | else |
56 56 | { |
57 57 | source_input_ms = argv[1]; |
58 58 | } |
59 59 | copy_input_ms = "ngc5921_ut.ms"; |
60 60 | |
61 61 | // Make a copy of the MS in the working directory |
62 62 | // TODO: Use C++17 filesystem copy https://en.cppreference.com/w/cpp/filesystem/copy |
63 - | String cp_command = std::string("cp -r ") + source_input_ms + " ."; |
63 + | String cp_command = std::string("cp -RL ") + source_input_ms + " ."; |
64 64 | auto cmd_ecode = system(cp_command.c_str()); |
65 65 | if (!cmd_ecode) |
66 66 | std::cerr << "Failed to copy " << copy_input_ms << " to current directory" <<std::endl; |
67 67 | |
68 68 | MS ms(copy_input_ms, Table::Update); |
69 69 | |
70 70 | Block<int> sort(4); |
71 71 | sort[2] = MS::FIELD_ID; |
72 72 | sort[3] = MS::ARRAY_ID; |
73 73 | sort[1] = MS::DATA_DESC_ID; |