mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Fix closing the same file twice.
This commit is contained in:
parent
6743211748
commit
74714227fb
@ -374,8 +374,6 @@ check_file_access (WEdit *edit, const char *filename, struct stat *st)
|
||||
return 1;
|
||||
}
|
||||
|
||||
mc_close (file);
|
||||
|
||||
/*
|
||||
* Don't delete non-empty files.
|
||||
* O_EXCL should prevent it, but let's be on the safe side.
|
||||
@ -392,6 +390,7 @@ check_file_access (WEdit *edit, const char *filename, struct stat *st)
|
||||
return 1;
|
||||
}
|
||||
|
||||
mc_close (file);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user