2021-05-29 13:41:04 +02:00
|
|
|
--- ./rust/libnewsboat/src/fslock.rs.orig 2021-05-17 16:33:46.781835254 +0000
|
|
|
|
+++ ./rust/libnewsboat/src/fslock.rs 2021-05-17 16:34:30.623855213 +0000
|
2021-01-07 15:18:15 +01:00
|
|
|
@@ -1,5 +1,4 @@
|
|
|
|
use crate::logger::{self, Level};
|
|
|
|
-use gettextrs::gettext;
|
|
|
|
use std::fs::{self, File, OpenOptions};
|
|
|
|
use std::io::{Error, Read, Write};
|
|
|
|
use std::os::unix::fs::OpenOptionsExt;
|
|
|
|
@@ -54,10 +53,10 @@
|
|
|
|
Ok(file) => file,
|
|
|
|
Err(reason) => {
|
|
|
|
return Err(fmt!(
|
2021-05-29 13:41:04 +02:00
|
|
|
- &gettext("Failed to open lock file '%s': %s"),
|
|
|
|
+ "Failed to open lock file '%s': %s",
|
2021-01-07 15:18:15 +01:00
|
|
|
new_lock_path
|
|
|
|
.to_str()
|
|
|
|
- .unwrap_or(&gettext("<filename containing invalid UTF-8 codepoint>")),
|
|
|
|
+ .unwrap_or("<filename containing invalid UTF-8 codepoint>"),
|
|
|
|
reason.to_string()
|
|
|
|
))
|
|
|
|
}
|
|
|
|
@@ -77,10 +76,10 @@
|
|
|
|
{
|
|
|
|
log!(Level::Debug, "FsLock: Failed to write PID");
|
|
|
|
return Err(fmt!(
|
2021-05-29 13:41:04 +02:00
|
|
|
- &gettext("Failed to write PID to lock file '%s': %s"),
|
|
|
|
+ "Failed to write PID to lock file '%s': %s",
|
2021-01-07 15:18:15 +01:00
|
|
|
new_lock_path
|
|
|
|
.to_str()
|
|
|
|
- .unwrap_or(&gettext("<filename containing invalid UTF-8 codepoint>")),
|
|
|
|
+ .unwrap_or("<filename containing invalid UTF-8 codepoint>"),
|
|
|
|
reason.to_string()
|
|
|
|
));
|
|
|
|
}
|
|
|
|
@@ -109,10 +108,10 @@
|
|
|
|
pid
|
|
|
|
);
|
|
|
|
Err(fmt!(
|
|
|
|
- &gettext("Failed to lock '%s', already locked by process with PID %{}"),
|
|
|
|
+ "Failed to lock '%s', already locked by process with PID %{}",
|
|
|
|
new_lock_path
|
|
|
|
.to_str()
|
|
|
|
- .unwrap_or(&gettext("<filename containing invalid UTF-8 codepoint>")),
|
|
|
|
+ .unwrap_or("<filename containing invalid UTF-8 codepoint>"),
|
|
|
|
PRIi64,
|
|
|
|
*pid as i64
|
|
|
|
))
|