@@ -54,8 +54,8 @@ bool DetectModifications::Run(Deployer* deployer) {
54
54
for (fs::directory_iterator iter (p), end; iter != end; ++iter) {
55
55
path entry (iter->path ());
56
56
if (fs::is_regular_file (fs::canonical (entry)) &&
57
- entry.extension ().string () == " .yaml" &&
58
- entry.filename ().string () != " user.yaml" ) {
57
+ entry.extension ().u8string () == " .yaml" &&
58
+ entry.filename ().u8string () != " user.yaml" ) {
59
59
last_modified =
60
60
(std::max)(last_modified,
61
61
filesystem::to_time_t (fs::last_write_time (entry)));
@@ -458,7 +458,7 @@ bool PrebuildAllSchemas::Run(Deployer* deployer) {
458
458
for (fs::directory_iterator iter (shared_data_path), end; iter != end;
459
459
++iter) {
460
460
path entry (iter->path ());
461
- if (boost::ends_with (entry.filename ().string (), " .schema.yaml" )) {
461
+ if (boost::ends_with (entry.filename ().u8string (), " .schema.yaml" )) {
462
462
the<DeploymentTask> t (new SchemaUpdate (entry));
463
463
if (!t->Run (deployer))
464
464
success = false ;
@@ -523,7 +523,7 @@ bool UserDictSync::Run(Deployer* deployer) {
523
523
}
524
524
525
525
static bool IsCustomizedCopy (const path& file_path) {
526
- auto file_name = file_path.filename ().string ();
526
+ auto file_name = file_path.filename ().u8string ();
527
527
if (boost::ends_with (file_name, " .yaml" ) &&
528
528
!boost::ends_with (file_name, " .custom.yaml" )) {
529
529
Config config;
@@ -550,7 +550,7 @@ bool BackupConfigFiles::Run(Deployer* deployer) {
550
550
path entry (iter->path ());
551
551
if (!fs::is_regular_file (entry))
552
552
continue ;
553
- auto file_extension = entry.extension ().string ();
553
+ auto file_extension = entry.extension ().u8string ();
554
554
bool is_yaml_file = file_extension == " .yaml" ;
555
555
bool is_text_file = file_extension == " .txt" ;
556
556
if (!is_yaml_file && !is_text_file)
@@ -590,7 +590,7 @@ bool CleanupTrash::Run(Deployer* deployer) {
590
590
path entry (iter->path ());
591
591
if (!fs::is_regular_file (entry))
592
592
continue ;
593
- auto file_name = entry.filename ().string ();
593
+ auto file_name = entry.filename ().u8string ();
594
594
if (file_name == " rime.log" || boost::ends_with (file_name, " .bin" ) ||
595
595
boost::ends_with (file_name, " .reverse.kct" ) ||
596
596
boost::ends_with (file_name, " .userdb.kct.old" ) ||
@@ -643,7 +643,7 @@ bool CleanOldLogFiles::Run(Deployer* deployer) {
643
643
try {
644
644
// preparing files
645
645
for (const auto & entry : fs::directory_iterator (dir)) {
646
- const string& file_name (entry.path ().filename ().string ());
646
+ const string& file_name (entry.path ().filename ().u8string ());
647
647
if (entry.is_regular_file () && !entry.is_symlink () &&
648
648
boost::starts_with (file_name, app_name) &&
649
649
boost::ends_with (file_name, " .log" ) &&
0 commit comments