Skip to content

Commit 8dee4fa

Browse files
authored
1.5.0-rc.4 (#187)
* chore: bumped version * fix: changed lock file path * chore: added lock files to .gitignore
1 parent de7c33a commit 8dee4fa

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/icon.ico
33
/file_icon.ico
44
*.evp
5+
*.evp#

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "evidenceangel"
33
description = "Library and executables to work with EvidenceAngel evidence packages (*.evp)."
4-
version = "1.5.0-rc.3"
4+
version = "1.5.0-rc.4"
55
edition = "2024"
66
license = "GPL-3.0-or-later"
77
authors = [

schemas/draft-hopkins-evp-spec.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,11 @@ an additional media file.
230230
## Locking
231231

232232
When loading an evidence package, implemetors **MUST** use a lock file
233-
with the file name ".~" followed by the full name of the package it
234-
protects, for example for a package called "example.evp", the lock file
235-
**MUST** be called ".~example.evp". It **MUST** be located adjacent (in
236-
the same directory as) the evidence package.
233+
with the file name ".~lock." followed by the full name of the package it
234+
protects, followed by "#", for example for a package called
235+
"example.evp", the lock file **MUST** be called ".~lock.example.evp#".
236+
It **MUST** be located adjacent (in the same directory as) the evidence
237+
package.
237238

238239
The lock file should be considered as locking the package if:
239240

src/zip_read_writer.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,14 @@ impl ZipReaderWriter {
6868
let mut lock_path = path.clone();
6969
// SAFETY: only a file can be specified here
7070
lock_path.set_file_name(format!(
71-
".~{}",
71+
".~lock.{}",
7272
lock_path.file_name().unwrap().to_str().unwrap()
7373
));
74+
// SAFETY: only a file can be specified here
75+
lock_path.set_extension(format!(
76+
"{}#",
77+
lock_path.extension().unwrap().to_str().unwrap()
78+
));
7479
let mut lock_file = LockFile::open(&lock_path).map_err(crate::Error::Locking)?;
7580
if !lock_file
7681
.try_lock_with_pid()

0 commit comments

Comments
 (0)