diff --git a/src/ModFile.hh b/src/ModFile.hh
index 7e28a30bb730c1fdade218e23ec8af8a67fc188d..457d480df7a12419cb1d071bb7b05dfa4ae04e6a 100644
--- a/src/ModFile.hh
+++ b/src/ModFile.hh
@@ -133,7 +133,7 @@ private:
 
   /* Hack for removing a directory that is locked by MATLAB/Windows. The
      directory is renamed before being deleted. The renaming must occur in the
-     same directory, otherwise it may file if the destination is not on the
+     same directory, otherwise it may fail if the destination is not on the
      same filesystem. This technique is applied recursively to subdirectories.
      Works even if the argument does not exist or is not a directory. */
   static void remove_directory_with_matlab_lock(const filesystem::path &dir);