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:
Antony Riakiotakis 2015-03-30 19:21:38 +02:00
parent 050f28f03f
commit 9b4172cc6c

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