Let 's wait for @safihre (or maybe @shypike) what they say about the code, and why it is done like this. And after that consider solutions / workarounds.
BTW: What does Microsoft says about the exit code / resultcode of rmdir on directories. Nothing on https://technet.microsoft.com/en-us/lib ... 90990.aspx :-(
preprocessing stuck at 99% if incomplete on smb3
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Re: preprocessing stuck at 99% if incomplete on smb3
I suppose the errorcode 9009 for rmdir on windows just means what rmdir reported, aka. "The directory is not empty."
The only rule of thumb which applies on all platforms dating back like forever is that your program should return 0 on a clean exit.
Only if something went fu it should return a non-zero code. What that is and how it translates into something "human readable" is pretty much up to whoever wrote the code.
Unfortunately Google doesn't give much of a explanation either, the topic is probably to generic.
But interessting how rmdir on two different platforms is acting in the exact same strange way and one of these platforms is from the same guys who are mainly responsible for the SMB protocol
The only rule of thumb which applies on all platforms dating back like forever is that your program should return 0 on a clean exit.
Only if something went fu it should return a non-zero code. What that is and how it translates into something "human readable" is pretty much up to whoever wrote the code.
Unfortunately Google doesn't give much of a explanation either, the topic is probably to generic.
But interessting how rmdir on two different platforms is acting in the exact same strange way and one of these platforms is from the same guys who are mainly responsible for the SMB protocol
Re: preprocessing stuck at 99% if incomplete on smb3
FWIW: I found this text on https://ss64.com/nt/rd.html ... so a difference between ERRORLEVEL (not set) and Exit Code.
FWIW #2:
Python-on-Windows talking to the Windows-share seems to work correctly:
... so it's a problem when Samba and/or Linux is involved?
EDITExit code / Errorlevel
In normal use RD will fail to return an ERRORLEVEL to the shell, irrespective if the command succeeds or fails the ERRORLEVEL will be left unchanged.
It will however set an Exit Code
Directory deleted successfully = 0
Invalid option = 1
Directory not found = 2
Access denied = 5
Directory in use = 32
Directory not empty = 145
A workaround to detect a non zero Exit Code from RD is to use conditional execution to run a command if the RD fails, the second command can be anything, an Echo, Goto or CALL statement:
RD NonExistentFolder || Echo This failed!
If you delete folders using PowerShell then a True/False return code ($?) will be set correctly.
FWIW #2:
Python-on-Windows talking to the Windows-share seems to work correctly:
Code: Select all
Z:\>c:\python27\python -c "import os ; os.rmdir('Z:\\Downloads') "
Traceback (most recent call last):
File "<string>", line 1, in <module>
WindowsError: [Error 145] The directory is not empty: 'Z:\\Downloads'
Re: preprocessing stuck at 99% if incomplete on smb3
Back from holidays
So the reuse is triggered when a job is added again from history (if it failed, using Retry button) or when using the precheck.
Basically sabnzbd will treat it as a whole new job, if the pre check was successful.
So it seems to me that we can easily set keep_dir=True, since we want to keep that directory anyway.
So the reuse is triggered when a job is added again from history (if it failed, using Retry button) or when using the precheck.
Basically sabnzbd will treat it as a whole new job, if the pre check was successful.
So it seems to me that we can easily set keep_dir=True, since we want to keep that directory anyway.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: preprocessing stuck at 99% if incomplete on smb3
Patched it.
Will be in 2.0.1.
Will be in 2.0.1.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate