Fix T43266, when we have a blendfile name use only that without the pid

for autosave. Will save Windows users from polluting their tmp folders
too much.
This commit is contained in:
Antonis Ryakiotakis 2015-03-30 19:21:38 +02:00
parent 050f28f03f
commit 9b4172cc6c
Notes: blender-bot 2023-02-14 09:36:42 +01:00
Referenced by issue #43266, Auto-save
1 changed files with 1 additions and 1 deletions

View File

@ -1086,7 +1086,7 @@ void wm_autosave_location(char *filepath)
if (G.main && G.relbase_valid) {
const char *basename = BLI_path_basename(G.main->name);
int len = strlen(basename) - 6;
BLI_snprintf(path, sizeof(path), "%.*s-%d.blend", len, basename, pid);
BLI_snprintf(path, sizeof(path), "%.*s.blend", len, basename);
}
else {
BLI_snprintf(path, sizeof(path), "%d.blend", pid);