sometimes I find myself renaming a file to a new name, and then
renaming it back to the original name. This causes the file to be
closed and then opened again, which is not necessary. This commit
fixes this issue by checking if the file is already open before
closing it.
sometimes I find myself renaming a file to a new name, and then renaming it back to the original name. This causes the file to be closed and then opened again, which is not necessary. This commit fixes this issue by checking if the file is already open before closing it.