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

5.0.2 default working directory not functioning #532

Closed
bigben386 opened this issue Feb 3, 2023 · 7 comments
Closed

5.0.2 default working directory not functioning #532

bigben386 opened this issue Feb 3, 2023 · 7 comments
Milestone

Comments

@bigben386
Copy link

Hi,
The default working directory setting does not appear to be working in 5.0.2 on windows. Users have set the default directory and have the output directory set to manual in pdfsam settings. If you just type a filename into the destination box, then the operation fails with a permission denied error. If you click browse, pdfsam defaults to the This PC folder.

@bigben386
Copy link
Author

Hi,
This still does not work in 5.1.1. You cannot save the default directory, close the program, then open the program, and have pdfsam default to the default working directory when using one of the modules like Merge. It defaults to the "This PC" folder every time the application is started.

torakiki added a commit that referenced this issue Oct 25, 2023
torakiki added a commit that referenced this issue Oct 26, 2023
…esn't seem to have the effect it should though).
@torakiki
Copy link
Owner

The output folder for the split tasks is now automatically populated with the default working dir.
I tested on Windows and Linux and all the Browse buttons open pointing to the working dir... what is your OS? Because from my tests it works as expected.
What I couldn't fix is when you type the output file name without the absolute path. In theory is fixed (the sys property user.dir is set) but in practice Java seems to ignore it, I have to investigate further or workaround this.

@bigben386
Copy link
Author

Hi @torakiki ,

Here is a video of what is happening on 5.1.3. Default working directory is set. Add some files to the merge window. Notice the destination file is not created in the specified default folder. Also if you click the browse button, it defaults to "This
google_screen_recording_2023-10-26T13-09_23.604Z.webm
PC" and not the specified default working directory. This was recorded on win11.

@torakiki
Copy link
Owner

From what I can see from the video, what you get is the expected behavior because you have selected "Use the selected PDF document directory as output directory", try select "Manually selected"

@bigben386
Copy link
Author

OK. I set it to "manually selected." Like you said, just entering a file name does not behave as expected. I did find that if you open the merge module and immediately click "Browse," you are taken to the default working directory. However, if you add the files first and then click "Browse," it is still defaulting to "This PC" for me and not the default working directory.

@torakiki
Copy link
Owner

Yes, that's what I was saying I couldn't fix. In the next version I added what should be a fix for that, I set the user.dir property to the user defined working directory but it seems it's ignored by Java and, when a file without the absolute path is created, it's not placed into the proper directory

@bigben386
Copy link
Author

Yeah I understand what you are saying about the relative file path but the browse button also does not work after you add files to the merge module. The browse button only opens to the default working directory if you click it before adding files.
Clicking browse before adding files:
image
clicking browse after adding files to merge module:
image

@torakiki torakiki added this to the 5.2.0 milestone Nov 2, 2023
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

No branches or pull requests

2 participants