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

Tiled silently fails to save file when it doesn't have Admin access on Windows 8. #965

Closed
primitiveType opened this Issue May 27, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@primitiveType

primitiveType commented May 27, 2015

When attempting to save a .tmx in a location that requires administrative access, if tiled does not have admin rights, it will fail silently. The unsaved asterisk by the filename will go away indicating that the file has been saved, but opening that file in a text editor reveals that no changes were successful. However, closing tiled and reopening it keeps the changes around (presumably because it is caching the file somewhere even though it isn't saving).

Also, when this happens, attempting to make changes to that file with a different editor will fail with a warning that the file is open in another process - even if tiled has been closed. I suspect that tiled is spawning a process or getting a lock on the file, and not releasing the lock after failing to save.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn May 28, 2015

Owner

Well, Tiled does not do any caching, spawning of processes (other than when you use custom commands) or locking of files. Any such behavior would be either somehow done by Qt or part of the system.

Yet, since it manages to restore the map on startup, evidently it managed to save the map somewhere. That also explains why Tiled remains silent, because no error comes up from the system. I suspect this may be some compatibility feature of Windows, which might be mapping the invalid location silently to some writable location.

In any case it's something that needs further investigation, and unfortunately I do not have a Windows 8 install.

Owner

bjorn commented May 28, 2015

Well, Tiled does not do any caching, spawning of processes (other than when you use custom commands) or locking of files. Any such behavior would be either somehow done by Qt or part of the system.

Yet, since it manages to restore the map on startup, evidently it managed to save the map somewhere. That also explains why Tiled remains silent, because no error comes up from the system. I suspect this may be some compatibility feature of Windows, which might be mapping the invalid location silently to some writable location.

In any case it's something that needs further investigation, and unfortunately I do not have a Windows 8 install.

@bjorn bjorn added bug windows labels May 28, 2015

@primitiveType

This comment has been minimized.

Show comment
Hide comment
@primitiveType

primitiveType May 28, 2015

apparently it is a problem in windows 8... or, a feature I suppose.
https://social.technet.microsoft.com/Forums/windows/en-US/7b3ada32-181d-4c55-9259-ee44f5f83b82/cant-write-to-program-files-folder
You can't write to files in the program files folder.Not sure why it fails silently or where it is saving that info that it appears to be caching, but would it be possible to set up the installer to place the example files in a newly created "Tiled Maps" folder inside the Documents folder, and pointing the "Open" dialog at that folder by default?

primitiveType commented May 28, 2015

apparently it is a problem in windows 8... or, a feature I suppose.
https://social.technet.microsoft.com/Forums/windows/en-US/7b3ada32-181d-4c55-9259-ee44f5f83b82/cant-write-to-program-files-folder
You can't write to files in the program files folder.Not sure why it fails silently or where it is saving that info that it appears to be caching, but would it be possible to set up the installer to place the example files in a newly created "Tiled Maps" folder inside the Documents folder, and pointing the "Open" dialog at that folder by default?

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Jun 5, 2016

Owner

Today @willluongo helped me by testing this on a VM with Windows 8 installed, and we noticed the issue was fixed in Qt 5.6, which now pops up a message box telling the user he can't save the file there.

The Windows 64-bit snapshots of Tiled are now already using Qt 5.6, and I will close this issue when also the 32-bit snapshot builds are compiled against Qt 5.6 (rather than Qt 5.5 as of now).

Owner

bjorn commented Jun 5, 2016

Today @willluongo helped me by testing this on a VM with Windows 8 installed, and we noticed the issue was fixed in Qt 5.6, which now pops up a message box telling the user he can't save the file there.

The Windows 64-bit snapshots of Tiled are now already using Qt 5.6, and I will close this issue when also the 32-bit snapshot builds are compiled against Qt 5.6 (rather than Qt 5.5 as of now).

@bjorn bjorn added the qt issue label Jul 2, 2016

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Jul 2, 2016

Owner

Both 32-bit and 64-bit snapshot builds are now compiled against Qt 5.6, so I'll close this issue. Also Tiled 0.16.2, which I plan to release tomorrow, will be compiled against Qt 5.6.

Owner

bjorn commented Jul 2, 2016

Both 32-bit and 64-bit snapshot builds are now compiled against Qt 5.6, so I'll close this issue. Also Tiled 0.16.2, which I plan to release tomorrow, will be compiled against Qt 5.6.

@bjorn bjorn closed this Jul 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment