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

Directory on usb stick is not recognized after disconnect #21

Closed
th-ros opened this issue Mar 15, 2022 · 1 comment
Closed

Directory on usb stick is not recognized after disconnect #21

th-ros opened this issue Mar 15, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@th-ros
Copy link

th-ros commented Mar 15, 2022

Hello,

I made a test with a hotfolder directory on an usb stick. After configuring the hotfolder and the usb stick is connected everthing works fine. Then I remove the stick and reconnect it and then the hotfolder plugin don't recognize new files in the directory.

What will I do?

Because of home office I have two notebooks on my desk and I use them with an external keyboard and mouse via a usb switch. Also I connected a usb stick to the usb switch and I can easily copy files from notebook1 to notebook2. Always when I switch to the other notebook the usb stick is connected and I can use this drive. On both notebooks I use a (not shared) joplin (one for work and one private).

But somethimes at work I will create a short private note. Or in the evening I work with my private notebook and I will write a note for work.

My idea is to use this usb stick to transfer easily notes from one notebook to the other always when I switch my notebooks with the usb switch.
To create new notes I use a very simple self written python script which adds normaly new notes via joplin api to joplin. I will modify it to save the note a) via joplin api to the local joplin or b) to the usb stick to a directory d:\joplin_hotfolder_work or d:\joplin_hotfolder_private. So next time I switch to the other notebook the notes will be imported by hotfolder plugin.

But the problem is the plugin won't recognise the "reconnected" usb stick.

Solution?

I checked the source code of hotfolder plugin a little bit and saw that i uses the chokidar module. Mabye the problem ist the watch mode and this ins't working with usb sticks or network drives. Perhaps the usePolling = true option will fix this behavior for usb sticks.

If this is the reason for not recognizing the reconnected usb stick, maybe a config switch for "special directories like dirs on usb sticks, network drives, ..." will enable the polling option (only for that folder). And also a config for "polling in x seconds" make sense - for me 60 seconds is enough.

I would be very cool if I can realise my idea this this "simple note transfer". Because of vpn for my work notebook it isn't possible to share drives in the same network so this solution with this parallel used usb stick seems very interessting.

My versions:

  • Joplin Windows (Portable) v2.7.14
  • Hotfolder Plugin v1.0.1
  • Windows 10 and Windows 11

Some informations:
paulmillr/chokidar#315 (comment)
paulmillr/chokidar#225 (comment)

Bye
Thomas

@JackGruber JackGruber added the enhancement New feature or request label Aug 17, 2023
@JackGruber
Copy link
Owner

Polling is available in version 1.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants