Skip to content

Commit

Permalink
chore: update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Zamiell committed Aug 23, 2023
1 parent d2cb0f4 commit cfcc139
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub fn backup(
)
}

copy(&existing_save_file_path, &destination_path).context(format!(
copy(existing_save_file_path, &destination_path).context(format!(
"Failed to copy:\n{}\n-->\n{}",
existing_save_file_path.to_string().green(),
destination_path.to_string().green(),
Expand Down
2 changes: 1 addition & 1 deletion src/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn delete(
existing_save_file_path.to_string().green(),
))?;

remove_file(&existing_save_file_path).context(format!(
remove_file(existing_save_file_path).context(format!(
"Failed to delete:\n{}",
existing_save_file_path.to_string().green(),
))?;
Expand Down
9 changes: 4 additions & 5 deletions src/save_data_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ pub fn get_documents_save_data_path(isaac_version: IsaacVersion) -> Result<Utf8P
let version_directory_name = get_version_directory_name(isaac_version);

// If the user has a custom "Documents" directory, Isaac ignores this and instead puts its files
// in the standard location
// Test to see if the "log.txt" file exists at the "standard" location
// e.g. "C:\Users\Alice\Documents\My Games\Binding of Isaac Repentance\log.txt"
// in the standard location. Test to see if the "log.txt" file exists at the "standard"
// location. (e.g. "C:\Users\Alice\Documents\My Games\Binding of Isaac Repentance\log.txt")
let standard_path = Utf8PathBuf::from(r"C:\")
.join("Users")
.join(username)
Expand All @@ -87,8 +86,8 @@ pub fn get_documents_save_data_path(isaac_version: IsaacVersion) -> Result<Utf8P
}

// The standard documents location does not seem to exist, so the user might have a "Documents"
// directory that is in a custom location
// The "dirs_next" library queries the Windows API to determine this
// directory that is in a custom location. The "dirs_next" library queries the Windows API to
// determine this.
let documents_path = dirs_next::document_dir()
.context("Unable to find the path to your \"Documents\" directory.")?;
let documents_path_utf8_result = Utf8PathBuf::from_path_buf(documents_path);
Expand Down

0 comments on commit cfcc139

Please sign in to comment.