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

Installing to a folder which "looks like a file" causes config / startup problems #676

Closed
Splike opened this issue Jan 7, 2020 · 10 comments

Comments

@Splike
Copy link

Splike commented Jan 7, 2020

System information:

  • Windows OS version: Windows 10 (build 1909) x64
  • ImageGlass version: 7.5.1.1 x64 (Portable)

What happens:

Location: C:\Users\XXXXXXX\OneDrive\Programs\[Portable] ImageGlass v7.5.1.1\
Behavior: Starting ImageGlass.exe from this location, will spawn the ImageGlass process and immediately terminate itself.

Location: C:\Users\XXXXXXX\Desktop\[Portable] ImageGlass v7.5.1.1\
Behavior: Starting ImageGlass.exe from this location, will start the first-time setup.

What should be done?

Let ImageGlass (especially the portable version), be able to launch from paths that are longer than the current maximum.

@fire-eggs
Copy link
Collaborator

Just to clarify: does this mean you've installed ImageGlass to your OneDrive?

Location: C:\Users\XXXXXXX\OneDrive\Programs[Portable] ImageGlass v7.5.1.1\

I ask because I'm able to run IG 7.5.1.1 from this folder with no problem:
C:\Users\Kevin\Desktop\A relatively long folder name\another longer folder name\[Portable] ImageGlass v7.5.1.1

So it's not the path length that is likely to be the issue.

@Splike
Copy link
Author

Splike commented Jan 9, 2020

Not really installed, but rather just placed the contents of ImageGlass_7.5.1.1_x64.zip in my OneDrive\Programs folder. I run all my portable programs from here.

@fire-eggs
Copy link
Collaborator

OK, I'm going to have to try under OneDrive. In the meantime, you might try copying igconfig.xml from the folder where you successfully ran IG to the OneDrive folder.

@Splike
Copy link
Author

Splike commented Jan 10, 2020

That actually seems to have solved the problem!

The igconfig.xml file was completely empty. So doing what you said, now starts ImageGlass without any error.

@Splike
Copy link
Author

Splike commented Jan 10, 2020

Upon further inspection, it doesn't seem to be running in "portable mode" anymore.

The Configuration directory is set to C:\Users\XXXXXXX\AppData\Roaming\ImageGlass, with no way for me to change it to a folder inside my portable directory.

For whatever reason, ImageGlass_7.5.1.1_x64.zip doesn't respect portable mode, where it should set Config dir to the same path as Startup dir, as mentioned here

@fire-eggs
Copy link
Collaborator

OK, we've solved one issue, and found another. I've seen the AppData\Roaming behavior myself - we reworked the config file a bit for this release, and seem to have missed a few things.

@fire-eggs fire-eggs changed the title Portable version cannot launch from "long" path Empty config when run from OneDrive; "portable" version uses AppData\Roaming for config file Jan 10, 2020
@fire-eggs
Copy link
Collaborator

I had to refresh my memory about how the "portable" mode works with the config file.

What you've stumbled into (and I have confirmed) is a bug where IG decides it is not in portable mode, if the folder name "looks like" a file name.

I.e. because you placed IG into a folder called [Portable] ImageGlass v7.5.1.1, IG got confused and decided portable mode wasn't possible.

So if you rename the folder so that it doesn't look like it has a "file extension", e.g. [Portable] ImageGlass v7_5_1_1, then IG will stop using AppData\Roaming.

Not ideal but hopefully a temporary workaround until this problem is solved.

Thank you for your patience and willingness to try various tests!

fire-eggs added a commit that referenced this issue Jan 10, 2020
…ortable mode (e.g. allow `ImageGlass V7.5` as a startup folder name
@Splike
Copy link
Author

Splike commented Jan 11, 2020

No problem, thank you for helping me getting it up and running!

With regards to the empty igconfig.xml in OneDrive, I think the issue actually lies with having a period in the folder name and not with OneDrive.

I extracted the contents of ImageGlass_7.5.1.1_x64.zip into the following location:
C:\Users\XXXXXXX\OneDrive\Programs\[Portable] ImageGlass v7_5_1_1, and was able to start it without any problem. The Config dir is now also the same path as the Startup dir!

Your commit, which lets the startup directory contain periods, might actually fix both the issue with the empty igconfig.xml file and respecting the portable mode.

@fire-eggs
Copy link
Collaborator

Glad to hear it! At least you have a work-around for the moment!

@fire-eggs fire-eggs changed the title Empty config when run from OneDrive; "portable" version uses AppData\Roaming for config file Installing to a folder which "looks like a file" causes config / startup problems Jan 16, 2020
@d2phap d2phap added this to the Issues 7.5.1.1 milestone Feb 23, 2020
d2phap added a commit that referenced this issue Feb 23, 2020
@d2phap d2phap pinned this issue Feb 23, 2020
@d2phap
Copy link
Owner

d2phap commented Feb 23, 2020

Fixed this bug in the latest build of ImageGlass Moon
https://imageglass.org/moon

@d2phap d2phap closed this as completed Feb 28, 2020
@d2phap d2phap unpinned this issue May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants