Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added .gitignore and configuration files, updated mounts_linux.go #294

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stoic-coder
Copy link

@stoic-coder stoic-coder commented Jan 27, 2025

Recently I upgraded my wsl distro from Ubuntu 22.04 to Ubuntu 24.04. When calling duf I recognized an error: "panic: runtime error: index out of range [11] with length 11", the cause of this is a line in /proc/self/mountinfo which contains a line for "/Docker/host" which contains itself unescaped path info referencing C:\Program Files" I changed the code so that it works agoin under wsl with Ubuntu 24.04.

The mounts_linux.go file has been updated with improved handling of comments, empty lines, and Windows-style paths. A helper function was also introduced to fix unescaped spaces in Windows-style paths.

New .gitignore file has been added to the project, specifying default ignored files. Several IntelliJ IDEA configuration files have also been introduced, including module settings, VCS mappings, and project modules. These changes aim to improve the development environment setup for contributors using this specific IDE.

New .gitignore and several configuration files have been added to the project. The mounts_linux.go file has been updated with improved handling of comments, empty lines, and Windows-style paths. A helper function was also introduced to fix unescaped spaces in Windows-style paths.
Added .gitignore and IDE configuration files

New .gitignore file has been added to the project, specifying default ignored files. Several IntelliJ IDEA configuration files have also been introduced, including module settings, VCS mappings, and project modules. These changes aim to improve the development environment setup for contributors using this specific IDE.
Significant changes include:
- Refactored the code to handle optional fields in a more efficient way.
- Added a warning message when there are too many fields in a line to avoid out-of-bounds error.
- Simplified switch cases for mount point, source, and file system type handling.
- Introduced a helper function to fix unescaped Windows paths. This is particularly useful when running in WSL (Windows Subsystem for Linux).
@stoic-coder stoic-coder marked this pull request as ready for review January 27, 2025 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant