Fix T63000: Don't use original file name for autosave

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4609
This commit is contained in:
Jacques Lucke 2019-04-04 14:38:18 +02:00
parent 1ffa7462a2
commit 2bc3418884
Notes: blender-bot 2023-02-14 06:45:14 +01:00
Referenced by issue #63000, Saving to custom temporary file path overwrites .blend files
1 changed files with 2 additions and 2 deletions

View File

@ -1360,10 +1360,10 @@ void wm_autosave_location(char *filepath)
if (G_MAIN && G.relbase_valid) {
const char *basename = BLI_path_basename(BKE_main_blendfile_path_from_global());
int len = strlen(basename) - 6;
BLI_snprintf(path, sizeof(path), "%.*s.blend", len, basename);
BLI_snprintf(path, sizeof(path), "%.*s (autosave).blend", len, basename);
}
else {
BLI_snprintf(path, sizeof(path), "%d.blend", pid);
BLI_snprintf(path, sizeof(path), "%d (autosave).blend", pid);
}
#ifdef WIN32