fixed a bug if the current view doesn't have a
hasn't been saved, and doesn't have a file path