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

[Bug] saving file through "Save as..." with no extension by default, making it impossible to save it again. #909

Closed
PashaWNN opened this issue Jul 27, 2024 · 3 comments
Assignees

Comments

@PashaWNN
Copy link

System

UVtools v4.0.2 X64
Operative system: Darwin 23.6.0 Darwin Kernel Version 23.6.0: Thu Jun 20 00:24:53 PDT 2024; root:xnu-10063.140.29.0.1~15/RELEASE_ARM64_T8103 X64
Processor: Apple M1
Processor cores: 8
Memory RAM: 5.07 / 8.23 GB
Runtime: osx.14-x64
Framework: .NET 6.0.22
AvaloniaUI: 11.0.4
OpenCV: 4.8.0

Sreens, resolution, working area, usable area:
1: 1440 x 900 @ 100% (Primary)
    WA: 1440 x 813    UA: 1440 x 813

Path:       /Applications/UVtools.app/Contents/MacOS/
Executable: /Applications/UVtools.app/Contents/MacOS/UVtools
Loaded file: test [Version: 516] [Class: PhotonWorkshopFile]

Printer and Slicer

  • Printer: Anycubic Photon Mono 4K
  • Slicer: LycheeSlicer

Description of the bug

"Save as..." dialog has no file extension specified by default. Saving the file without extension by default makes saving it again impossible.

Expected behavior after saving file without extension:
Save dialog opens, allowing to specify filename

Actual behavior:
"Unable to find the target extension." message is shown.

How to reproduce

  1. Open file with ".pwma" extension
  2. Edit it
  3. Save it through "Save as..." without extension (possibly by mistake as it has no extension in save dialog by default)
  4. Try to save it again using "Save as..."

Files

No response

Copy link

This is your first time submitting an issue with UVtools 🥳Please review your issue and ensure that the submit template was followed, the information is complete, and not related to any other open issue. It will be reviewed shortly. Debugging is very important and make the program better. Thanks for contributing and making the software better! 🙌

@sn4k3
Copy link
Owner

sn4k3 commented Jul 27, 2024

In fact I do no validation to file name and solely trust on system dialog scheme.

Windows: Filename show with extension on dialog, removing will force the extension, changing will make it append the real extension in the end, so in this case it's impossible to mess it up.
Linux: Filename shows with no extension on dialog, but saving will append it, but if you put a new extension in filename it will use that instead make it wrong.
macOS: Works like windows but extension is not displayed on filename, this also proved to be impossible to temper in my tests (Monterey)

So in this case I'm observing a different behavior than you. Probably due different system I don't know.
Here my two tests that yield in correct extension output:

image
image

But as I understand in your case it saves without extension? If possible provide screenshot of save dialog or a video.
PS: Also upgrade your UVtools version and see if the same happens. Bug reports using past versions are not much valid.

@PashaWNN
Copy link
Author

Yeah, that is fixed in new version. After upgrade I've got "file format" dropdown in save dialog along with automatically appended extension by default and it is appending extension during save even if I manually delete it. Thanks.

sn4k3 added a commit that referenced this issue Jul 30, 2024
- **File formats:**
  - (Add) File format: Klipper zip
  - (Add) Properties:
    - `Pause` and `ChangeResin` to layers
    - `BottomLiftAcceleration`
    - `BottomLiftAcceleration2`
    - `LiftAcceleration`
    - `LiftAcceleration2`
    - `BottomRetractAcceleration`
    - `BottomRetractAcceleration2`
    - `RetractAcceleration`
    - `RetractAcceleration2`
  - (Add) PrusaSlicer Keywords:
    - `FILECLASS_xxx` to define the file class directly instead of a file extension
    - `BottomLiftAcceleration`
    - `BottomLiftAcceleration2`
    - `BottomRetractAcceleration`
    - `BottomRetractAcceleration2`
    - `LiftAcceleration`
    - `LiftAcceleration2`
    - `RetractAcceleration`
    - `RetractAcceleration2`
  - (Add) Property `HaveTiltingVat` to know if the printer have a tilting vat
  - (Add) Compatibility with tilting vat Saturn 4 Ultra which also fixes print time estimate (#906)
  - (Add) Encrypted CTB: Tries to predict tilting vat printers from set parameters
  - (Change) CWS: Append `;<Slice>` as first line in the layer instead when required
  - (Change) VDT: Move FTL previews to top to be used as first in conversion
  - (Improvement) Anycubic: Write the image color table based on the AntiAliasing level (#899)
  - (Improvement) Encrypted CTB: Implement the `ModifiedTimestampMinutes` and `AntiAliasLevel` field
  - (Fix) nanoDLP `slicer.json` deserialize problem on some files
  - (Fix) SL1: The keyword `TransitionLayerCount_xxx` not being set on the file (#902)
  - (Fix) PHZ: Generated invalid thumbnail data (#903)
- **Tools:**
  - (Improvement) Pixel arithmetic: Add extra checks to ignore empty size and layers
  - (Change) Edit print parameters: Allow set lift and retract speeds to 0 (#906)
- **UI:**
  - (Add) Menu - File - Copy parameters to files: Allow to copy parameters from current file to another file(s) (#852)
  - (Improvement) Menu - File - Reset layer properties: Hold SHIFT key to also rebuild layers position with the file layer height (#870)
  - (Improvement) Save as and convert file save dialog: Force the correct file extension if been tampered (#909)
  - (Improvement) Exposure time finder: Disable incompatible panels instead of hide them
  - (Add) Layer preview shortcuts: A/W/S/D to pan the layer image and Q/E to go to previous/next layer (#871)
  - (Fix) Prevent CTRL + SHIFT + Up/Down (Issue navigation shortcut) from change layer
- (Add) PrusaSlicer printer: Elegoo Saturn 4 Ultra
- (Fix) Linux AppImage: Failed to change to directory "~" (No such file of directory) (#891)
- (Upgrade) OpenCV from 4.8.0 to 4.9.0
- (Upgrade) AvaloniaUI from 11.0.10 to 11.1.1 (Fixes #872)
- (Upgrade) .NET from 6.0.29 to 6.0.32
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