@@ -226,10 +226,10 @@ struct scoped_test_env
226
226
return filename;
227
227
}
228
228
229
- std::string create_symlink (fs::path source_path,
230
- fs::path to_path,
231
- bool sanitize_source = true ,
232
- bool is_dir = false ) {
229
+ std::string create_file_dir_symlink (fs::path source_path,
230
+ fs::path to_path,
231
+ bool sanitize_source = true ,
232
+ bool is_dir = false ) {
233
233
std::string source = source_path.string ();
234
234
std::string to = to_path.string ();
235
235
if (sanitize_source)
@@ -240,6 +240,20 @@ struct scoped_test_env
240
240
return to;
241
241
}
242
242
243
+ std::string create_symlink (fs::path source_path,
244
+ fs::path to_path,
245
+ bool sanitize_source = true ) {
246
+ return create_file_dir_symlink (source_path, to_path, sanitize_source,
247
+ false );
248
+ }
249
+
250
+ std::string create_directory_symlink (fs::path source_path,
251
+ fs::path to_path,
252
+ bool sanitize_source = true ) {
253
+ return create_file_dir_symlink (source_path, to_path, sanitize_source,
254
+ true );
255
+ }
256
+
243
257
std::string create_hardlink (fs::path source_path, fs::path to_path) {
244
258
std::string source = source_path.string ();
245
259
std::string to = to_path.string ();
@@ -325,12 +339,12 @@ class static_test_env {
325
339
env_.create_dir (" dir1/dir2/dir3" );
326
340
env_.create_file (" dir1/dir2/dir3/file5" );
327
341
env_.create_file (" dir1/dir2/file4" );
328
- env_.create_symlink (" dir3" , " dir1/dir2/symlink_to_dir3" , false , true );
342
+ env_.create_directory_symlink (" dir3" , " dir1/dir2/symlink_to_dir3" , false );
329
343
env_.create_file (" dir1/file1" );
330
344
env_.create_file (" dir1/file2" , 42 );
331
345
env_.create_file (" empty_file" );
332
346
env_.create_file (" non_empty_file" , 42 );
333
- env_.create_symlink (" dir1" , " symlink_to_dir" , false , true );
347
+ env_.create_directory_symlink (" dir1" , " symlink_to_dir" , false );
334
348
env_.create_symlink (" empty_file" , " symlink_to_empty_file" , false );
335
349
}
336
350
0 commit comments