diff --git a/gitlib/filesystem.py b/gitlib/filesystem.py index 9fc9cdf..3a96bd8 100644 --- a/gitlib/filesystem.py +++ b/gitlib/filesystem.py @@ -25,7 +25,7 @@ class FilesystemLibrary: def _rmmod(self, module): self.logger.debug("Trying to unload module {module}...") - subprocess.run(["/usr/sbin/rmmod", module], check=True) + subprocess.run(["/usr/sbin/rmmod", module], check=False) def _modprobe(self, module): self.logger.debug("Trying to load module {module}...") diff --git a/gitlib/gitlib.py b/gitlib/gitlib.py index 04e2a07..84d5c41 100755 --- a/gitlib/gitlib.py +++ b/gitlib/gitlib.py @@ -1249,8 +1249,8 @@ class OpengnsysGitLibrary: #self.logger.debug("Commit done, will unmount now") #self._umount_device(device) - - self.fs.unload_ntfs() + if self.fs.filesystem_type(mountpoint = path) == "ntfs": + self.fs.unload_ntfs() repo_url = self._getOgRepository(repo_name)