Skip to content

Normalize Paths in Filesystem Permissions to Fix Directory-Dependent Bugs #229

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MohamedAl-Kainai
Copy link

Previously, filesystem permission checks could fail when the current working directory changed, because relative paths were not consistently resolved. By ensuring all permission checks and grants use normalized, absolute paths, permissions now work reliably regardless of the current directory. This change eliminates bugs caused by path resolution issues and makes permission matching robust across all environments.

if (data is String) {
data = p.normalize(p.absolute(data));
}
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of putting filesystem-specific code in runtime.dart, please move this into the Filesystem*Permission match() functions

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.

2 participants