r/learnprogramming • u/World-war-dwi • Nov 22 '23
Debugging Can't figure out what's wrong with this filsystem - fusepy (FUSE)
Hello, i really need help on this one please.
I'm want to implement a filesystem that will hold two versions of each file in a folder (an encrypted one and the clear one). it will then serve one or another depending on the user authentication.
For now, I need the fs to just display (normally) the mounted folder. And I can't achieve that.
here's my code : https://pastebin.com/HjEwCdmQ
When i try to list the test folder after mounting it, the ls never terminate. It even makes the system hang sometimes.
1
Upvotes
•
u/AutoModerator Nov 22 '23
On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.
If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:
as a way to voice your protest.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/sidit77 Nov 22 '23
If I'm reading your code correctly, you're trying to read a directory (= call
readdir) of your filesystem inside the handler function forreaddir. Thatreaddircall will then call the handler function, which will in turn do anotherreaddircall. Essentially recursion without an exit condition or an infinite loop.